Community-oriented bus line intelligent scheduling decision support method and system

By integrating data to identify travel destination patterns and adopting multi-agent collaborative decision-making, community bus routes are optimized, solving the problem that existing systems cannot accurately distinguish passenger travel needs. This enables on-demand allocation of transport capacity, improving the efficiency of critical travel and passenger satisfaction.

CN121436610BActive Publication Date: 2026-03-27NINGBO YIKATONG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

The existing community bus dispatch system cannot accurately distinguish the travel needs of passengers going to different destinations, which makes it impossible for dispatch decisions to intelligently determine which type of service should be prioritized, thus making it difficult to improve the efficiency and satisfaction of critical travel services.

Method used

By collecting and integrating historical passenger flow data, real-time travel booking request data, and static data, clustering algorithms are used to identify travel destination patterns. A multi-agent collaborative decision-making framework is used to generate dynamic scheduling schemes, optimize route sequences, and generate skip-station instructions to achieve on-demand intelligent allocation of transport capacity.

Benefits of technology

It enables precise scheduling based on travel purpose identification and priority guarantee, improving the efficiency of community buses in ensuring critical travel and passenger satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121436610B_ABST
    Figure CN121436610B_ABST
Patent Text Reader

Abstract

The application relates to a community-oriented bus line intelligent scheduling decision support method and system, which solves the problems of unreasonable allocation of transport capacity and insufficient guarantee of key travel demand caused by the inability to distinguish travel purposes in the existing scheduling method. The method comprises the following steps: firstly, integrating card swiping, reservation and static data to construct a travel demand data set; secondly, identifying travel purpose modes and extracting multi-modal features through a clustering algorithm, and using an adaptive multi-head attention model to predict and generate a prediction report containing passenger flow heat maps and a space-time probability matrix, and then calculating the service priority of each mode; thirdly, constructing a decision-making framework coordinated by route planning and skip-stop decision-making agents, wherein a global reward function gives differentiated weights according to the priority, and a dynamic scheduling scheme is jointly generated. The application has the following effects: precise scheduling of community buses based on travel purpose identification and priority guarantee is realized, and the allocation of transport capacity is upgraded to intelligent allocation according to demand.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent transportation, in particular to an intelligent scheduling decision support method and system for community bus lines. BACKGROUND

[0002] As an important public transportation service connecting residential communities and surrounding public facilities, the scheduling efficiency of community bus lines is directly related to the travel convenience of community residents and the accessibility of public services. Traditionally, the operation and scheduling of such lines largely rely on fixed running schedules, static line planning, and personal experience judgments of scheduling personnel.

[0003] In the prior art, to improve the scientificity of scheduling, common practices include using historical passenger flow data for statistical analysis to optimize fixed shifts, or using vehicle GPS positioning data to realize real-time monitoring and simple state adjustment of vehicles. Some more advanced systems attempt to integrate real-time passenger reservation requests to fine-tune specific shifts. In addition, some researches are dedicated to applying time series prediction models to predict short-term passenger flow at stations or sections, providing a reference for scheduling decisions.

[0004] However, these existing methods generally have a core defect: they usually process passenger flow data in a general manner, and cannot accurately distinguish between travel demands of passengers going to different destinations such as schools, hospitals, and markets. This results in scheduling decisions that can only be adjusted based on the overall passenger flow, and when there are multiple needs such as going to school and going to the hospital, the system cannot intelligently determine which type of service should be prioritized, making it difficult to truly improve the efficiency and satisfaction of community buses in key travel protection. SUMMARY

[0005] To realize precise scheduling of community buses based on travel destination recognition and priority protection, and upgrade from uniform distribution of transport capacity to intelligent allocation on demand, the present application provides an intelligent scheduling decision support method and system for community bus lines.

[0006] In a first aspect, the present application provides an intelligent scheduling decision support method for community bus lines, which adopts the following technical solution:

[0007] An intelligent scheduling decision support method for community bus lines, comprising:

[0008] Collect and integrate historical passenger flow card swiping data from the payment system, real-time travel reservation request data from the special application APP for community personnel, and static data containing community population structure and public facility distribution, and construct a travel demand dataset through spatiotemporal indexing alignment;

[0009] Based on the travel demand data set and the public facility distribution information, a clustering algorithm is used to identify travel purpose patterns with different spatio-temporal characteristics, and accordingly, travel record subsets corresponding to each pattern are divided to extract their spatio-temporal clustering features, time series evolution features and spatial correlation features, which are input into a multi-head attention prediction model with integrated adaptive weights to generate a prediction report containing sub-period passenger flow heat maps and spatio-temporal probability matrices of each pattern, and based on the spatio-temporal probability matrices of each pattern and the preset community service strategy, service time window priority values of each pattern are calculated and generated;

[0010] Based on the prediction report and the service time window priority values, a multi-agent collaborative decision-making framework is constructed, a route planning agent optimizes the line sequence under the constraints of must-stop stations and vehicle capacity by taking the passenger flow heat map and the spatio-temporal probability matrix as input, a skip-stop decision-making agent generates skip-stop instructions according to the service time window priority values combined with the competitive deep Q network, and the two agents perform strategy collaboration through a shared critic network, the global reward function of the critic network gives higher on-time rate weight to the travel purpose patterns with priority values higher than a set threshold, and a dynamic scheduling scheme is output together;

[0011] The dynamic scheduling scheme is converted into instructions and issued to the vehicle-mounted and passenger service terminals to complete real-time scheduling.

[0012] By adopting the above technical solutions, the method realizes the change of scheduling from "uniform service" to "precise guarantee" by identifying different travel purpose patterns (such as commuting and medical treatment) and quantifying their service priorities. Based on multi-agent collaborative decision-making, the system can intelligently prioritize high-priority demands (such as medical treatment travel) when the transport capacity is tight, while optimizing the overall line efficiency, thereby significantly improving the reliability of key community public services and passenger satisfaction.

[0013] In a second aspect, the present application provides an intelligent scheduling decision support system for community bus lines, which adopts the following technical solutions:

[0014] An intelligent scheduling decision support system for community bus lines, comprising a memory, a processor and a program stored on the memory and executable on the processor, which can be loaded and executed by the processor to implement the intelligent scheduling decision support method for community bus lines as described in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is a flowchart of an intelligent scheduling decision support method for community bus lines according to an embodiment of the present application.

[0016] Figure 2 is a flowchart of identifying travel purpose patterns with different spatio-temporal characteristics based on travel demand data sets and public facility distribution information according to another embodiment of the present application. Detailed Implementation

[0017] The present application will be further described in detail below with reference to the accompanying drawings.

[0018] Reference Figure 1 This application discloses an intelligent dispatching decision support method for community bus routes, comprising:

[0019] Step S1: Collect and integrate historical passenger flow card swiping data from the payment system, real-time travel reservation request data from the dedicated application APP for community members, and static data containing community population structure and public facility distribution, and construct a travel demand dataset by aligning it with spatiotemporal indexes.

[0020] The data includes: Historical passenger card swipe data: Records passenger card swipe behavior, including card number, swipe time, and station information, obtained from the bus company's database. Real-time travel reservation request data: Travel requests submitted by community residents through the app, including origin and destination points, time windows, etc., pushed to the dispatch platform in real time via the app. Static data: Information on community population structure and public facility distribution, obtained from civil affairs and planning departments, stored in file format. Spatiotemporal index alignment: Data is unified to the same spatiotemporal benchmark for easier subsequent processing.

[0021] The necessary processes are described below: 1. Data Collection: Historical passenger flow card swiping data is obtained from the public transportation payment system, including card number, swiping time, station number, etc.; real-time travel reservation request data is collected through a community-specific APP. With the user's explicit authorization and agreement to the "Privacy Policy" and "Data Usage Agreement," travel demand information such as origin and destination latitude and longitude, and expected travel time is obtained. User IDs and other direct personal identifiers are anonymized and hashed after transmission; static data on community population structure and public facility distribution are obtained from civil affairs and planning departments and stored in file format. All data collection, storage, and processing processes comply with relevant laws and regulations to ensure data security and are used solely for the purpose of optimizing public transportation services. 2. Spatiotemporal Index Alignment and Data Fusion: Geographic coordinates are encoded using the GeoHash algorithm, dividing the community into a 500m × 500m spatial grid, and time is divided into 15-minute granularities to generate spatiotemporal index keys. Card swiping data, reservation request data, and static data are aligned using the spatiotemporal index, marking travel purposes such as medical treatment, schooling, etc. Simultaneously, the population density index of each grid is calculated to enrich the dataset features.

[0022] 3. Travel demand dataset construction: Construct a structured travel demand dataset, each row containing a spatiotemporal index key, passenger flow count, reservation user number, surrounding facility type vector (such as [0, 1, 0, 1] indicating nearby schools and supermarkets), population density index, etc. For example, the data of a certain spatiotemporal unit is "ws7j9e_202501150730, 50, 20, [0, 1, 0, 1], 0.8", indicating that there are 50 people in the unit, 20 reservation requests, nearby schools and supermarkets, and a population density index of 0.8.

[0023] Step S2, based on the travel demand dataset and public facility distribution information, a clustering algorithm is used to identify travel purpose patterns with different spatiotemporal characteristics, and accordingly, travel record subsets corresponding to each pattern are divided to extract their spatiotemporal clustering features, time series evolution features and spatial correlation features, which are input into an integrated adaptive weight multi-head attention prediction model to generate a prediction report containing sub-period passenger flow heat maps and spatiotemporal probability matrices of each pattern, and based on the spatiotemporal probability matrices of each pattern and the preset community service strategy, the service time window priority value of each pattern is calculated.

[0024] Among them, the spatiotemporal probability matrix describes the probability of different travel patterns appearing in each spatiotemporal unit, which is used to evaluate the distribution characteristics of each pattern. The service time window priority value is a value calculated based on the spatiotemporal probability matrix and the community service strategy, reflecting the service importance of each travel pattern in different time periods.

[0025] The process of using a clustering algorithm to identify travel purpose patterns with different spatiotemporal characteristics can refer to steps S21 to S25, which will not be repeated here. The generation of a prediction report containing sub-period passenger flow heat maps and spatiotemporal probability matrices of each pattern can refer to steps S2a to S2e. The calculation of the service time window priority value of each pattern can refer to steps S2A to S2D.

[0026] Step S3, based on the prediction report and the service time window priority value, a multi-agent collaborative decision-making framework is constructed, the route planning agent takes the passenger flow heat map and the spatiotemporal probability matrix as input, optimizes the line sequence under the constraints of mandatory stop sites and vehicle capacity, the skip-stop decision-making agent generates skip-stop instructions according to the service time window priority value combined with the competitive deep Q network, and the two agents perform strategy collaboration through a shared critic network, the global reward function of the critic network gives higher on-time rate weight to travel purpose patterns with priority values higher than a certain threshold, and outputs a dynamic scheduling scheme.

[0027] In the step, the multi-agent collaborative decision-making framework is a system composed of multiple agents, each of which completes complex tasks through cooperation. In this step, it includes route planning agent and skip station decision-making agent. Route planning agent: responsible for optimizing the sequence of bus routes, input is passenger flow heat map and space-time probability matrix, output is the optimized route sequence. Skip station decision-making agent: responsible for generating skip station instructions, input is service time window priority value, and generates decisions through competitive deep Q network (DQN). Critic network: a network used to evaluate the strategy of the agent, and the decision of the agent is evaluated and adjusted through the global reward function. Global reward function: according to the priority value, different weights are given to different travel modes, and the punctuality rate of high priority mode is preferentially guaranteed.

[0028] In the step, the optimization of route sequence under the constraints of mandatory stop stations and vehicle capacity can refer to steps S31 to S35, and the skip station decision-making agent generates skip station instructions according to the service time window priority value combined with the competitive deep Q network can refer to steps S3a to S3c. The common output dynamic scheduling scheme can refer to steps 1 to 8.

[0029] In step S4, the dynamic scheduling scheme is converted into instructions and issued to the vehicle-mounted terminal and the passenger service terminal, and real-time scheduling is completed. Among them, the vehicle-mounted terminal: the device installed on the bus, used to receive scheduling instructions and adjust the vehicle running state in real time. Passenger service terminal: APP or other information terminal used by community residents, used to provide real-time bus information and scheduling change notification to passengers.

[0030] The necessary processes are as follows: 1. Instruction conversion and issuance: Convert the dynamic scheduling scheme into specific instruction format, adapt to the system requirements of the vehicle terminal and passenger service terminal. After receiving the instruction, the vehicle terminal automatically adjusts the driving route and stop site of the vehicle. Example: The scheduling system sends the instruction "Vehicle A123 skips site B and adds stop site C in the current journey" to the vehicle terminal, and the driver adjusts the vehicle operation state according to the instruction. 2. Real-time information push: Through the passenger service terminal (such as community APP), real-time scheduling information is pushed to passengers, including vehicle location, estimated arrival time, stop site change, etc. Example: The passenger receives the notification through the APP: "The A123 bus you are taking will add a new stop site C due to dynamic adjustment, and the estimated arrival time will be 5 minutes earlier, please pay attention to check." 3. Scheduling execution and feedback: After the vehicle terminal and passenger service terminal execute the scheduling instruction, real-time feedback is given. The scheduling system further optimizes the scheduling scheme according to the feedback information to ensure the accuracy and efficiency of the scheduling. Example: After the driver confirms that the vehicle has adjusted the route according to the instruction, the vehicle terminal feedbacks the execution; the passenger feedbacks the satisfaction of the scheduling change through the APP, and the scheduling system optimizes the subsequent scheduling strategy according to the feedback. 4. Complete real-time scheduling: Through the cooperation of the vehicle terminal and the passenger service terminal, the dynamic scheduling scheme is successfully implemented, realizing the real-time optimization and efficient operation of public transportation service. Example: During the morning peak of weekdays, a line adjusts the stop site according to the dynamic scheduling scheme to ensure that students and medical passengers can arrive at their destinations on time, and passengers can obtain real-time information about the vehicle through the APP, improving the travel experience.

[0031] Reference Figure 2 Based on the travel demand data set and public facility distribution information, a clustering algorithm is used to identify travel purpose patterns with different spatio-temporal characteristics, including:

[0032] Step S21, the historical passenger flow card data and real-time reservation request data are de-identified to generate anonymous travel trajectory records containing only departure time, departure location and arrival time.

[0033] Wherein, the de-identification processing: remove personal identification information (such as card number, user ID, etc.) in the data, and retain spatio-temporal information related to travel, in order to protect user privacy. The necessary process is as follows: After extracting historical passenger flow card data and real-time reservation request data from public transportation payment system and community APP, use SHA-256 hash algorithm to encrypt card number and user ID, remove personal identification information. Use Pandas library to clean data, retain travel information such as departure time, departure location and arrival time, and format time stamp and latitude and longitude. Finally, generate anonymous travel trajectory records and store them in HDFS or relational database to provide data support for subsequent analysis.

[0034] Step S22, a density-based spatio-temporal clustering algorithm is used to define the spatio-temporal coupling neighborhood with a preset spatial neighborhood radius and time window, and the anonymous travel trajectory records are clustered to obtain multiple travel behavior clusters. Among them, the density-based spatio-temporal clustering algorithm: a clustering algorithm that identifies clusters by calculating the density of data points within a spatio-temporal neighborhood. This algorithm can effectively handle noise and outliers in spatio-temporal data, and is suitable for clustering analysis of travel trajectory data. Spatio-temporally coupled neighborhood: a region defined by a preset spatial neighborhood radius and time window, used to determine the spatio-temporal correlation between data points. The spatial neighborhood radius defines the distance range in geographical space, and the time window defines the time range in the time dimension. Anonymous travel trajectory record: data after de-identification, only containing travel-related information such as departure time, departure location, arrival time, etc., used for subsequent clustering analysis. Travel behavior cluster: a collection of travel behaviors with similar spatio-temporal characteristics obtained by clustering algorithm, each cluster represents a specific travel mode.

[0035] The specific process is as follows:

[0036] 1. Define the spatio-temporally coupled neighborhood: preset spatial neighborhood radius (e.g. 500 meters) and time window (e.g. 30 minutes), these two parameters together define the spatio-temporally coupled neighborhood. For each anonymous travel trajectory record, calculate its spatial and temporal distance from other records. Spatial distance is calculated using Euclidean distance, and temporal distance is calculated using the absolute value of the timestamp difference.

[0037] Example: Suppose the departure locations of two travel trajectories are (114.0582, 22.5431) and (114.0592, 22.5441), and the departure times are 2025-01-15T07:45:00Z and 2025-01-15T07:50:00Z respectively. The spatial distance is 141.4 meters (Euclidean distance), and the temporal distance is 5 minutes. If the preset spatial neighborhood radius is 500 meters and the time window is 30 minutes, then the two trajectories are in the spatio-temporally coupled neighborhood.

[0038] 2. Density-based spatio-temporal clustering: DBSCAN algorithm is used to cluster the anonymized trip trajectory records. DBSCAN algorithm identifies clusters by computing the density of each data point in its spatio-temporal neighborhood. Core points are those points that have at least MinPts (e.g., 5) points in their neighborhood, which form a cluster. Border points are points that have fewer than MinPts points in their neighborhood but are connected to a core point. Noise points are points that are neither core points nor border points. For example, suppose there are 10 trip trajectories in a certain area within a certain time period, 8 of which have a spatial distance of less than 500 meters and a temporal distance of less than 30 minutes, satisfying the condition of MinPts = 5. These 8 trajectories will be divided into a trip behavior cluster. The remaining 2 trajectories may be classified as noise points or form new small clusters if they have no spatio-temporal relationship with the cluster.

[0039] 3. Generating trip behavior clusters: DBSCAN algorithm is used to divide the anonymized trip trajectory records into multiple trip behavior clusters. The trajectories within each cluster have spatio-temporal similarity, representing a specific travel mode. For example, through clustering analysis, it is found that in a certain community during the morning of weekdays from 7:00 to 9:00, there are multiple trip behavior clusters. One cluster contains multiple trajectories from the community to nearby schools, with highly concentrated departure times and departure locations, labeled as "school mode"; another cluster contains multiple trajectories to the hospital, labeled as "medical mode".

[0040] 4. Cluster result evaluation: The generated trip behavior clusters are evaluated to ensure the rationality and effectiveness of the clustering results. The separation and tightness of the clusters can be evaluated by indicators such as silhouette coefficient. The closer the silhouette coefficient value is to 1, the higher the similarity within the cluster and the greater the difference between clusters. For example, the silhouette coefficient of the clustering result is calculated, and if the silhouette coefficient is 0.7, it indicates that the clustering result is ideal, with high spatio-temporal similarity within the cluster and significant differences between different clusters.

[0041] Step S23, based on the public facility distribution information, the end position of the trajectory in each trip behavior cluster is spatially matched with the public facilities within a predetermined distance range. The specific process can refer to steps S231 to S234, which will not be repeated here.

[0042] Step S24, semantic labeling according to the matching result: when the number of trajectories matching a certain type of public facility in a certain travel behavior cluster accounts for more than a preset threshold proportion of the total number of trajectories in the travel behavior cluster, the travel behavior cluster is labeled as a mode with the type of public facility as the travel purpose. Wherein, semantic labeling: giving the travel behavior cluster a label with clear meaning, describing the main travel purpose of the cluster, such as "going to school", "going to hospital", "shopping", etc. Preset threshold: a proportion value (such as 60%), used to determine whether a certain type of public facility is the main travel purpose of a certain travel behavior cluster. If the number of trajectories matching the type of public facility accounts for more than the threshold proportion of the total number of trajectories in the cluster, it is considered that the public facility is the main travel purpose of the cluster. Number of matching trajectories: the number of trajectories that have a spatial matching relationship with a certain type of public facility in step S23. Total number of trajectories in the cluster: the number of all trajectories contained in a certain travel behavior cluster.

[0043] The necessary process is as follows: 1. Count the number of matching trajectories: for each travel behavior cluster, count the number of trajectories that have a spatial matching relationship with each type of public facility. For example: there are 100 trajectories in a certain travel behavior cluster, 60 of which have a spatial matching relationship with a school, 30 of which have a spatial matching relationship with a hospital, and 10 of which have a spatial matching relationship with a shopping mall. 2. Calculate the matching proportion: calculate the proportion of the number of matching trajectories of each type of public facility to the total number of trajectories in the cluster. For example: for the above travel behavior cluster, the proportion of school matching trajectories is 60%, the proportion of hospital matching trajectories is 30%, and the proportion of shopping mall matching trajectories is 10%. 3. Determine the main travel purpose: according to the preset threshold (such as 60%), determine whether a certain type of public facility is the main travel purpose of the travel behavior cluster. If the matching proportion of a certain type of public facility exceeds the preset threshold, the travel behavior cluster is labeled as a mode with the type of facility as the travel purpose. For example: the preset threshold is 60%, and since the proportion of school matching trajectories is 60%, which reaches the preset threshold, the travel behavior cluster is labeled as a "school mode". 4. Label the travel purpose mode: use the judgment result as semantic labeling to give the travel behavior cluster a clear travel purpose label. For example: label the above travel behavior cluster as a "school mode", indicating that the main travel purpose of the cluster is to go to school.

[0044] Step S25, based on the labeling result, obtain each travel behavior cluster with a semantic travel purpose label and its spatio-temporal characteristics. Wherein, semantic travel purpose label: the main travel purpose of the travel behavior cluster labeled by step S24, such as "going to school", "going to hospital", "shopping", etc., has clear semantic meaning.

[0045] The necessary process is as follows: 1. Integrating the labeling results and the spatiotemporal features: integrating the semantic travel purpose label obtained in step S24 and the spatiotemporal features of the travel behavior cluster extracted in step S22. Each travel behavior cluster not only has a clear travel purpose label, but also retains its feature information in time and space. For example: a travel behavior cluster is labeled as "school mode", and its spatiotemporal features include that the departure time is concentrated in the morning of weekdays from 7:00 to 8:00, the departure location is mainly concentrated around the community, and the terminal position is concentrated near the school. 2. Extracting spatiotemporal feature details: for each travel behavior cluster, further extract detailed spatiotemporal features, including but not limited to: 2.1, time feature: distribution of travel time, such as peak period, valley period, etc. 2.2, spatial feature: distribution of departure location and terminal position, density and concentration area of trajectory. 2.3, trajectory feature: length, direction, speed, etc. of trajectory. For example: for the "school mode" travel behavior cluster, the time feature shows that the travel is concentrated in the morning of weekdays from 7:00 to 8:00, the spatial feature shows that the departure location is mainly concentrated in several communities around the community, and the terminal position is concentrated near the school, and the trajectory length is mostly between 2-5 kilometers. 3. Generating travel behavior clusters with semantic labels: after integrating the labeling results and spatiotemporal features, generating travel behavior clusters with semantic travel purpose labels. These clusters not only clearly define the travel purpose, but also describe the spatiotemporal rules of travel in detail. For example: the generated travel behavior cluster is described as: "school mode, travel time is concentrated in the morning of weekdays from 7:00 to 8:00, departure location is mainly concentrated in several communities around the community, terminal position is concentrated near the school, and trajectory length is mostly between 2-5 kilometers."

[0046] Based on the distribution information of public facilities, the terminal positions of the trajectories in each travel behavior cluster are spatially matched with the public facilities within a predetermined distance range, including:

[0047] In step S231, according to the function type and scale attribute of the public facility, a differentiated spatial influence radius is set to construct a facility influence range model. The function type and scale attribute of the public facility: the public facility is classified and described according to its function (such as school, hospital, mall, etc.) and scale (such as the number of students in the school, the number of beds in the hospital, the area of the mall, etc.), which determines the service capacity and influence range of the facility. Spatial influence radius: a radius range set according to the function type and scale attribute of the public facility, used to define the geographical area that the facility can effectively serve. Facilities of different functions and scales have different spatial influence radii. Facility influence range model: a model constructed based on the function type and scale attribute of the public facility, used to describe the spatial influence range of each facility, providing a basis for subsequent spatial matching.

[0048] The necessary procedures are as follows: 1. Functional type and scale attribute analysis: First, analyze the functional type and scale attribute of public facilities in detail. According to the functional type (such as schools, hospitals, shopping malls, etc.) and scale attribute (such as the number of students in a school, the number of beds in a hospital, the area of a shopping mall, etc.) of the facility, determine the service capacity and influence range of each facility. For example: for a large school (with more than 3000 students), its spatial influence radius may be set to 2 kilometers; while for a small community hospital (with less than 100 beds), its spatial influence radius may be set to 1 kilometer. 2. Set differentiated spatial influence radius: According to the functional type and scale attribute of public facilities, set differentiated spatial influence radius. Large facilities usually have larger spatial influence radius, while small facilities have relatively small spatial influence radius. For example: the spatial influence radius of a large shopping mall (with an area of more than 10000 square meters) is set to 3 kilometers, while the spatial influence radius of a small convenience store (with an area of less than 100 square meters) is set to 500 meters. 3. Construct facility influence range model: Based on the set spatial influence radius, construct the facility influence range model. This model combines the geographic coordinates of each facility with its corresponding spatial influence radius through geographic information system (GIS) technology to generate the geographic influence area of the facility. For example: using GIS software, combine the location coordinates (114.0600, 22.5450) of the school and its 2-kilometer spatial influence radius to generate a circular influence area. This area is considered to be the geographic range that can be effectively served by the school.

[0049] Step S232, for each trip behavior cluster, the trajectory endpoint is preliminarily matched with the facility influence range model to generate a candidate set of destination facilities; then, taking this candidate set as input, based on road network data, the actual path distance from each trajectory endpoint to the candidate facilities is calculated, precise matching is performed, and the list of candidate facilities corresponding to each trajectory and their precise path distances is output. Among them, the road network data: contains detailed information of the road network, such as road type, length, connection relationship, etc., which is used to calculate the actual path distance. Candidate set: the set of possible destination facilities generated in the preliminary matching stage, used for further precise matching. Precise path distance: the actual path distance from the trajectory endpoint to the candidate facility calculated based on the road network data, considering the actual traffic conditions and road network.

[0050] The necessary procedures are as follows: 1. Preliminary matching to generate a candidate set: For each travel behavior cluster, the trajectory endpoint is preliminarily matched with the facility influence range model. The specific operation is to check whether the endpoint of each trajectory is located within the spatial influence range of a facility. If the trajectory endpoint is located within the influence range of the facility, the facility is added to the candidate set. For example: the endpoint of a trajectory in a travel behavior cluster is located at the longitude and latitude (114.0610, 22.5460), and it is found through the facility influence range model that the point is located within the influence range of a school (spatial influence radius of 2 kilometers) and a hospital (spatial influence radius of 1 kilometer), so the school and the hospital are both added to the candidate set. 2. Calculate the actual path distance based on the road network data: Taking the candidate set generated by preliminary matching as input, the actual path distance from each trajectory endpoint to the candidate facility is calculated based on the road network data. The shortest path is calculated on the road network data using a path planning algorithm (such as Dijkstra algorithm or A* algorithm). For example: for the trajectory endpoint (114.0610, 22.5460) described above, the actual path distance to the school and the hospital is calculated. Assuming that the road network data indicates that the shortest path distance to the school is 1.5 kilometers and the shortest path distance to the hospital is 0.8 kilometers. 3. Perform accurate matching: According to the calculated actual path distance, accurate matching is performed. The facility with the shortest actual path distance is selected as the main destination of the trajectory. For example: in the above example, since the actual path distance to the hospital (0.8 kilometers) is shorter than the distance to the school (1.5 kilometers), the hospital is selected as the main destination of the trajectory. 4. Output the accurate matching list: For each trajectory, output the list of its corresponding candidate facilities and their accurate path distances. The list contains the name, type, actual path distance, and other information of each candidate facility. For example, the output list is as follows:

[0051] Trajectory endpoint: (114.0610, 22.5460);

[0052] Candidate facility 1: school, actual path distance: 1.5 kilometers;

[0053] Candidate facility 2: hospital, actual path distance: 0.8 kilometers;

[0054] Main destination: hospital.

[0055] Step S233, for each trajectory, the facility with the shortest actual path distance is selected as the main destination from the accurate matching list, and if the actual path distance is less than a preset threshold, it is determined that the trajectory is successfully associated with the facility. The preset threshold is a distance upper limit value set to judge the association between the trajectory endpoint and the facility. If the actual path distance is less than the threshold, it is considered that the trajectory is successfully associated with the facility.

[0056] For each trajectory, select the facility with the shortest actual path distance from the exact match list as the primary destination. If the shortest path distance is less than a preset threshold, determine that the trajectory is successfully associated with the facility. The specific operation is as follows: 1. Select the shortest path facility: For each trajectory, select the facility with the shortest actual path distance from the exact match list as the primary destination of the trajectory. For example: The exact match list of a trajectory shows that the distance to the school is 1.5 kilometers and the distance to the hospital is 0.8 kilometers, so the hospital is selected as the primary destination. 2. Judge the association: Check whether the shortest path distance is less than a preset threshold. If it is less than the threshold, determine that the trajectory is successfully associated with the facility; otherwise, consider that it is not successfully associated. For example: The preset threshold is 1 kilometer, the distance of the trajectory to the hospital is 0.8 kilometers, which is less than the threshold, so it is determined that the trajectory is successfully associated with the hospital.

[0057] In step S234, for each travel behavior cluster, the number of trajectories successfully associated with different types of public facilities is counted to form a facility matching statistical matrix. The trajectories successfully associated: In step S233, the trajectories with an actual path distance less than a preset threshold from a public facility. The facility matching statistical matrix: A statistical matrix recording the number of trajectories successfully associated with different types of public facilities in each travel behavior cluster, used to analyze the main travel purpose of each cluster.

[0058] The necessary process is as follows: 1. Count the number of trajectories successfully associated: For each travel behavior cluster, count the number of trajectories successfully associated with different types of public facilities. The specific operation is to traverse all trajectories in each travel behavior cluster, check whether each trajectory is successfully associated with a public facility, and record the type of associated facility. For example: In a travel behavior cluster, there are 100 trajectories, of which 60 are successfully associated with schools, 30 are successfully associated with hospitals, and 10 are successfully associated with shopping malls. 2. Construct the facility matching statistical matrix: According to the statistical results, construct the facility matching statistical matrix. The matrix records the number of trajectories successfully associated with each type of public facility in each travel behavior cluster. For example: Assuming there are two travel behavior clusters (cluster 1 and cluster 2), and the types of public facilities include schools, hospitals, and shopping malls. The statistical results are as follows:

[0059] Cluster 1: 60 school, 30 hospital, 10 shopping mall;

[0060] Cluster 2: 20 school, 40 hospital, 40 shopping mall.

[0061] The facility matching statistical matrix is recorded as:

[0062] Cluster 1: 60 school, 30 hospital, 10 shopping mall;

[0063] Cluster 2: 20 school, 40 hospital, 40 shopping mall.

[0064] The generation of the prediction report containing the time-division passenger flow heat map and the mode-specific spatio-temporal probability matrix includes:

[0065] In step S2a, based on the travel record subset corresponding to each travel purpose mode, the spatio-temporal clustering feature, the time series evolution feature and the spatial correlation feature are obtained in parallel by using the multi-modal feature extraction technology, and the above features are fused into a unified multi-modal feature representation by using the feature fusion algorithm based on attention weight. The multi-modal feature extraction technology is a technology that integrates multiple data feature extraction methods, which is used to extract data features from different angles (such as space, time, correlation, etc.) to obtain a more comprehensive data representation. The spatio-temporal clustering feature describes the clustering characteristics of data in time and space, such as clustering center, density distribution, etc. The time series evolution feature describes the trend and law of data change over time, such as periodicity, trend, etc. The spatial correlation feature describes the mutual relationship of data in space, such as spatial autocorrelation, spatial clustering, etc. The feature fusion algorithm based on attention weight is an algorithm that dynamically adjusts the weight of each feature by using the attention mechanism, which is used to fuse the features of different modalities into a unified feature representation.

[0066] The necessary process is described as follows: 1. Spatio-temporal clustering feature extraction: For each travel purpose mode corresponding travel record subset, use clustering algorithm (such as DBSCAN) for spatio-temporal clustering, extract spatio-temporal clustering features. These features include clustering center, density distribution, etc., which can reflect the clustering characteristics of travel records in space and time. For example: for the "school mode" travel record subset, multiple clustering centers are found through the DBSCAN algorithm, each center represents a high-density travel area, such as the school area. 2. Time series evolution feature extraction: Analyze the passenger flow trend of each travel purpose mode in different time periods, extract time series evolution features. These features describe the variation of passenger flow with time, such as peak hours, low hours, etc. For example: for "work mode", it is found that the morning 7:00-9:00 is the peak period, and the passenger flow density is significantly higher than other periods. 3. Spatial correlation feature extraction: Use spatial analysis methods (such as spatial autocorrelation analysis) to evaluate the spatial correlation between travel records, extract spatial correlation features. These features describe the spatial relationship between travel records, such as spatial clustering. For example: for "shopping mode", through spatial autocorrelation analysis, it is found that the travel records around the shopping mall have high spatial clustering, indicating that these areas are the main shopping destinations. 4. Feature fusion based on attention weight: Use feature fusion algorithm based on attention weight to fuse spatio-temporal clustering features, time series evolution features and spatial correlation features into unified multi-modal feature representation. The algorithm dynamically adjusts the weight of each feature through the attention mechanism, ensuring that the fused features can effectively reflect the spatio-temporal characteristics of the travel mode. For example: for "medical mode", the algorithm may give higher weight to the time series evolution features, because the time regularity of medical behavior is stronger, and also consider the spatial correlation features to reflect the travel clustering around the hospital.

[0067] Step S2b, input the multi-modal feature representation into the multi-head attention prediction model, combine the community passenger flow spatio-temporal distribution prior knowledge, and dynamically calculate the importance weight of each feature dimension through the adaptive weighting mechanism in the prediction model to generate a feature weight distribution matrix.

[0068] Wherein, multi-head attention prediction model: a deep learning model that simultaneously focuses on different feature dimensions through multi-head attention mechanism, can dynamically adjust the weight of each feature dimension, improve the accuracy and robustness of prediction. Community passenger flow spatio-temporal distribution prior knowledge: the distribution rule of community passenger flow in time and space based on historical data and experience summary, used to assist model prediction. Adaptive weighting mechanism: the mechanism inside the model, which can dynamically adjust the weight of each feature dimension according to the input data, to reflect the importance of different features in the prediction task. Feature weight distribution matrix: records the weight distribution of each feature dimension in different prediction tasks, reflects the attention degree of the model to different features.

[0069] The multi-head attention prediction model adopts a Transformer encoder architecture, and the specific construction parameters are as follows: the number of encoder layers is 3; the number of attention heads in each layer of the multi-head self-attention mechanism is 8, which aims to capture the dependencies in multiple dimensions such as travel purpose, time period, and spatial region in parallel; the hidden layer dimension of the model is 256; the internal dimension of the feedforward neural network is 1024, and the ReLU activation function is used. The training of the model aims to minimize the mean square error of passenger flow prediction, uses the Adam optimizer, sets the initial learning rate to 0.0001, and adopts the preheating and cosine annealing strategy for adjustment. The training data is a spatiotemporal sequence sample constructed based on community historical data, the batch size is 64, the training rounds are dynamically determined according to the loss of the validation set no longer decreasing, and usually 100-200 rounds.

[0070] The necessary process is as follows: 1. Input multi-modal feature representation: input the multi-modal feature representation obtained in step S2a into the multi-head attention prediction model. These feature representations integrate spatiotemporal clustering features, time series evolution features, and spatial correlation features, providing a rich information foundation for the model. For example: the input multi-modal feature representation includes cluster center position, time series trend, spatial correlation strength, and other dimensions. 2. Combine prior knowledge: during model training, combine the prior knowledge of community passenger flow spatiotemporal distribution to help the model better understand and predict passenger flow distribution. Prior knowledge can be used as a regularization term or auxiliary input to guide the model to learn feature weights that are more consistent with actual conditions. For example: if it is known that the community has a clear morning rush hour from 7:00 to 9:00 on weekdays, this prior knowledge can be used as auxiliary input to help the model more accurately predict passenger flow distribution during peak hours. 3、

[0071] Adaptive weighting mechanism: The multi-head attention prediction model dynamically calculates the importance weights of each feature dimension through an adaptive weighting mechanism. The attention heads within the model focus on different feature dimensions and dynamically adjust the weights based on the input data to reflect the importance of different features in the current prediction task. For example, when predicting passenger flow during the morning peak on weekdays, the model may assign a higher weight to the time series evolution feature because this feature is more critical in describing the passenger flow changes during the peak period. When predicting passenger flow on weekends, the spatial correlation feature may receive a higher weight because the passenger flow distribution on weekends may depend more on specific leisure areas.

[0072] Step S2c: Based on the feature weight distribution matrix, the spatio-temporal graph attention network is used to capture the spatio-temporal dependence between different travel purpose modes, and a deep neural network model is used to predict the passenger flow density distribution of each station at different time periods to generate a time-periodic passenger flow heat map.

[0073] ST-GAT: A deep learning model that combines spatio-temporal information and graph neural networks (GNN), capturing dependencies in spatio-temporal data through attention mechanisms, suitable for processing data with spatio-temporal correlations. Deep neural network model: A model used to predict the passenger flow density distribution of each station at different time periods, usually combining convolutional neural networks (CNN) and recurrent neural networks (RNN) structures to handle the complexity of spatio-temporal data. Time-periodic passenger flow heat map: A visualization tool that displays the passenger flow density distribution of each station at different time periods, helping to intuitively understand the spatio-temporal changes in passenger flow.

[0074] The construction of the spatio-temporal graph attention network (ST-GAT) is closely dependent on the bus network: taking bus stations as nodes, if the actual road distance between two stations is within 2 kilometers, it is considered that there is a potential passenger flow correlation, and an edge is established in the graph. This graph structure is a manifestation of the combination of the algorithm and the characteristics of the traffic space. The network structure contains 2 layers of graph attention layers. The first layer has an input dimension of 256 and an output dimension of 128, using 4 attention heads to capture different aspects of station association features (such as distance, historical passenger flow direction), and the activation function is LeakyReLU. The output dimension of the second layer corresponds to the number of time periods to be predicted. This hierarchical design enables the model to learn and predict the networked passenger flow propagation pattern from direct station associations.

[0075] The necessary process is as follows: 1. Input feature weight distribution matrix: input the feature weight distribution matrix generated in step S2b into the spatio-temporal graph attention network (ST-GAT). This matrix provides the importance weight of each feature dimension in different prediction tasks, helping the model better understand the role of different features. 2. Capture spatio-temporal dependence: the spatio-temporal graph attention network captures the spatio-temporal dependence between different travel purpose patterns through the graph structure. The nodes in the network represent stations, and the edges represent the spatio-temporal association between stations. The attention mechanism allows the model to dynamically adjust the attention degree to different nodes and edges, thereby more accurately capturing the spatio-temporal dependence. For example: for the "school mode" and "work mode", the model discovers through the attention mechanism that there is a strong spatio-temporal association between the stations around the school and the residential area stations during the morning peak on weekdays. 3. Deep neural network prediction: based on the captured spatio-temporal dependence, use a deep neural network model to predict the passenger flow density distribution of each station at different times. The model usually combines convolutional neural networks (CNN) to process spatial information and recurrent neural networks (RNN) to process time series information to generate high-precision prediction results. For example: the model predicts that during the morning peak on weekdays, the passenger flow density of the stations around the school increases significantly, while during the evening peak, the passenger flow density of the commercial area stations is higher. 4. Generate time-period passenger flow heat map: visualize the prediction results as a time-period passenger flow heat map. The heat map visually displays the passenger flow density distribution of each station at different times through color depth, helping decision-makers quickly understand the spatio-temporal changes of passenger flow. For example: the generated heat map shows that during the morning of weekdays from 7:00 to 9:00, the stations around the school appear red (high passenger flow density), while during other time periods, they gradually turn yellow or green (low passenger flow density).

[0076] In step S2d, with the passenger flow heat map as input, a Bayesian inference-based probability calculation framework is introduced, combining the historical spatio-temporal distribution rules of each travel purpose mode to calculate the conditional occurrence probability of each mode at a specific station and time period, and construct a complete spatio-temporal probability matrix.

[0077] The necessary procedures are as follows: 1. Input passenger flow heat map and historical data: the time-period passenger flow heat map generated in step S2c is taken as input, and the historical spatio-temporal distribution rules of each travel purpose mode are combined. The historical data is extracted from the database, including the appearance frequency of each mode at different stations in the past period of time. For example: the heat map shows that the passenger flow density of the stations around the school is higher during 7:00-9:00 in the morning on weekdays. The historical data shows that the appearance frequency of the “school mode” at these stations is 0.75. 2. Bayesian inference framework: a probability calculation framework based on Bayesian inference is introduced, which combines historical data and current heat map information to calculate the conditional appearance probability of each mode at a specific station and time period. Bayesian theorem is used to update the prior probability, and the specific formula is as follows: .

[0078] Wherein, P(M|S, T): the conditional appearance probability of mode M at station S and time period T. P(S, T|M): the likelihood probability of station S and time period T under mode M. P(M): the prior probability of mode M. P(S, T): the marginal probability of station S and time period T. For example: assuming that the historical appearance probability P(M) of the “work mode” during the morning peak on weekdays is 0.8, and the current heat map shows that the passenger flow density of the stations in the business district is higher, combining these information, the conditional appearance probability P(M|S, T) of the “work mode” at these stations is calculated as 0.85.

[0079] 2. Calculate the conditional appearance probability: for each travel purpose mode, calculate its conditional appearance probability at a specific station and time period. Through the Bayesian inference framework, combining historical data and current heat map information, the appearance probability of each mode is dynamically updated. For example: for the “school mode”, the historical data shows that the appearance probability P(M) during the morning peak on weekdays is 0.75, and the current heat map shows that the passenger flow density of the stations around the school is higher, combining these information, the conditional appearance probability P(M|S, T) of the “school mode” at these stations is calculated as 0.9.

[0080] 3. Build a spatio-temporal probability matrix: integrate the conditional appearance probability of each travel purpose mode at a specific station and time period into a matrix to form a complete spatio-temporal probability matrix. The rows of the matrix represent different stations, the columns represent different time periods, and the elements in the matrix represent the appearance probability of a certain mode at a specific station and time period.

[0081] Step S2e, integrate the generated time-period passenger flow heat map with the spatio-temporal probability matrix of each mode, and encapsulate it into a structured prediction report.

[0082] The necessary procedures are as follows:

[0083] 1. Integrate the sub-period passenger flow heat map and the spatiotemporal probability matrix: Integrate the sub-period passenger flow heat map generated in step S2c and the spatiotemporal probability matrix generated in step S2d. The specific operation is to combine the passenger flow density information in the heat map with the conditional occurrence probability information in the probability matrix to form a comprehensive data set. For example: for the morning of weekdays from 7:00 to 9:00, the passenger flow density of stations around schools is high (the heat map shows red), and the spatiotemporal probability matrix shows that the "school mode" has a 0.9 probability of appearing at these stations. Integrate this information into a data structure.

[0084] 2. Package into a structured prediction report: Package the integrated data into a structured prediction report. The report contains the following content:

[0085] Station information: the geographical location and name of each station.

[0086] Time period information: the start and end times of different time periods.

[0087] Passenger flow density: the passenger flow density of each station in different time periods (extracted from the heat map).

[0088] Conditional occurrence probability: the conditional occurrence probability of each travel purpose mode at a specific station and time period (extracted from the spatiotemporal probability matrix).

[0089] Visual chart: includes visual representations of sub-period passenger flow heat maps and probability matrices to help understand the data intuitively.

[0090] The intelligent scheduling decision support method for community bus lines also includes the step of continuously optimizing the multi-head attention prediction model:

[0091] Step Sa, based on the vehicle GPS trajectory data and station passenger flow data collected in actual operation, reconstruct the actual passenger flow distribution heat map and actual mode distribution matrix corresponding to the actual operation situation.

[0092] Among them, the vehicle GPS trajectory data: the vehicle position information collected by the GPS device on the vehicle in real time, including time stamp and latitude and longitude coordinates, used to reflect the actual running track of the vehicle. Station passenger flow data: the station passenger flow data collected by the passenger flow monitoring device (such as infrared sensor, video monitoring, etc.) at the station, recording the number of passengers boarding and alighting at each station in different time periods. Actual passenger flow distribution heat map: a visualization tool generated based on vehicle GPS trajectory data and station passenger flow data, showing the passenger flow density distribution of each station in different time periods in actual operation. Actual mode distribution matrix: a matrix generated based on vehicle GPS trajectory data and station passenger flow data, recording the actual occurrence probability of each travel purpose mode at a specific station and time period.

[0093] The necessary procedures are as follows: 1. Data collection: Collect actual operation data from vehicle GPS devices and station passenger flow monitoring devices. Vehicle GPS trajectory data includes timestamp and latitude and longitude coordinates, and station boarding and alighting passenger flow data includes the number of boarding and alighting passengers at each station in different time periods. For example: vehicle GPS trajectory data is recorded as "2025-01-15T07:45:00Z, longitude 114.0600, latitude 22.5450", and station boarding and alighting passenger flow data is recorded as "Station A, 2025-01-15T07:45:00Z, boarding passengers 10, alighting passengers 5". 2. Data preprocessing: Preprocess the collected data, including data cleaning, formatting, and alignment. Ensure that the timestamps are consistent, remove abnormal data points, and convert the data to a unified format. For example: align the timestamps of vehicle GPS trajectory data and station boarding and alighting passenger flow data to ensure their consistency in time. 3. Generate actual passenger flow distribution heat map: Based on the preprocessed vehicle GPS trajectory data and station boarding and alighting passenger flow data, generate an actual passenger flow distribution heat map. The heat map visually displays the passenger flow density distribution of each station in different time periods through color depth. For example: the generated heat map shows that during weekdays from 7:00 to 9:00 in the morning, the passenger flow density of stations around schools is high (red), and the passenger flow density of stations in commercial areas is moderate (yellow). 4. Generate actual mode distribution matrix: Based on the preprocessed data, generate an actual mode distribution matrix. The matrix records the actual occurrence probability of each travel purpose mode at a specific station and time period. For example: the actual mode distribution matrix shows that during weekdays from 7:00 to 9:00 in the morning, the actual occurrence probability of the "school mode" at stations around schools is 0.9, and the actual occurrence probability of the "work mode" at stations in commercial areas is 0.85.

[0094] Step Sb, calculate the spatial feature difference between the passenger flow heat map in the prediction report and the actual passenger flow distribution heat map to obtain the heat map difference degree; at the same time, calculate the probability distribution difference between the mode space-time probability matrix in the prediction report and the actual mode distribution matrix to obtain the probability matrix difference degree.

[0095] Wherein, the heat map difference degree: the spatial feature difference between the predicted passenger flow heat map and the actual passenger flow distribution heat map, used to evaluate the accuracy of the prediction. The probability matrix difference degree: the probability distribution difference between the predicted mode space-time probability matrix and the actual mode distribution matrix, used to evaluate the accuracy of the prediction.

[0096] The necessary procedures are as follows:

[0097] 1. Heat map difference degree calculation:

[0098] The passenger flow density difference between the predicted passenger flow heat map in the prediction report and the actual passenger flow distribution heat map is calculated for each station and time period. The mean absolute error (MAE) is used as the difference degree indicator, and the formula is as follows: . Wherein, is the predicted passenger flow density, is the actual passenger flow density, is the total number of stations and time periods. For example: for station A in time period T1, the predicted passenger flow density is 80 people, and the actual passenger flow density is 75 people, the difference is 5 people. The overall heat map difference degree is 0.05.

[0099] 2. Probability matrix difference degree calculation:

[0100] The conditional occurrence probability difference between the predicted mode space-time probability matrix in the prediction report and the actual mode distribution matrix is calculated for each station and time period. The KL divergence is used as the difference degree indicator, and the formula is as follows: . Wherein, is the predicted conditional occurrence probability, is the actual conditional occurrence probability, is the total number of stations and time periods.

[0101] For example: for station A in time period T1, the predicted probability of the "school mode" is 0.9, and the actual probability is 0.85, the KL divergence is 0.03.

[0102] Step Sc, combine the heat map difference degree and the probability matrix difference degree through a weighted fusion algorithm to generate a unified model prediction bias indicator.

[0103] Wherein, the weighted fusion algorithm: an algorithm that combines multiple difference degree indicators by assigning weights to each indicator to generate a comprehensive model prediction bias indicator. Model prediction bias indicator: a comprehensive indicator used to evaluate the overall bias of the prediction model, combining the heat map difference degree and the probability matrix difference degree.

[0104] The necessary process is as follows:

[0105] 1. Determine the weight distribution: according to the actual demand and experience, assign weights to the heat map difference degree and the probability matrix difference degree. The weight distribution should reflect the importance of each indicator in model evaluation. For example: assuming the weight of the heat map difference degree is 0.6 and the weight of the probability matrix difference degree is 0.4, indicating that the heat map difference degree is more important in model evaluation.

[0106] 2. Weighted fusion calculation:

[0107] The heat map difference degree and the probability matrix difference degree are combined using the weighted fusion algorithm to generate a unified model prediction bias indicator. The specific formula is as follows:

[0108] Model prediction deviation index = a x heat map difference + β x probability matrix difference.

[0109] Where a and β are the weights of heat map difference and probability matrix difference, respectively, and a + β = 1. For example: assuming the heat map difference is 0.05, the probability matrix difference is 0.03, and the weights are 0.6 and 0.4, respectively, the model prediction deviation index is:

[0110] Model prediction deviation index = 0.6 x 0.05 + 0.4 x 0.03 = 0.042.

[0111] 3. Generate model prediction deviation index: output the calculated model prediction deviation index in a structured data format for subsequent model optimization.

[0112] For example: the output result may contain the following content:

[0113] Model prediction deviation index: 0.042.

[0114] 4. Evaluation and adjustment: based on the generated model prediction deviation index, evaluate the prediction performance of the model. If the deviation index exceeds the preset threshold, the model needs to be optimized and adjusted. At the same time, according to the actual evaluation result, it may be necessary to adjust the weight distribution to more accurately reflect the importance of each index. For example: if the preset threshold is 0.05 and the current model prediction deviation index is 0.042, the model performance is good and no optimization and adjustment are needed. If the deviation index is 0.06, the model needs to be further optimized.

[0115] Step Sd, when the model prediction deviation index exceeds the preset threshold, use the incremental learning algorithm to optimize and adjust the parameters in the multi-head attention prediction model. Incremental learning uses the Adam optimizer, with hyperparameters β1 and β2 set to 0.9 and 0.999, respectively. The learning rate adopts a step decay strategy, i.e. every 10 mini-batches of training, the learning rate is multiplied by the decay factor 0.95. The stopping condition for incremental learning is: use independent recent operation data as the validation set for evaluation, if the model prediction deviation index obtained by continuous 3 times of validation (each time interval is 50 mini-batches of training) does not decrease, terminate this round of incremental learning.

[0116] The necessary process is as follows: 1. Evaluate the deviation index: compare the model prediction deviation index with the preset threshold value. If the deviation index exceeds the threshold value, it indicates that there is a large deviation between the model prediction and the actual operation data, and optimization adjustment is needed. For example, the preset threshold value is 0.05, and the current deviation index is 0.06, indicating that the model needs to be adjusted. 2. Select the incremental learning algorithm: select the small batch gradient descent algorithm as the incremental learning method. This algorithm updates the model parameters through small batch data, which can maintain the stability of the model and quickly adapt to new data. Set the small batch size to 100 samples and the learning rate to 0.01 to ensure the gradual optimization of model parameters. 3. Prepare incremental learning data: extract vehicle GPS trajectory data and station passenger flow data from actual operation data, which should be consistent with the input format of the model. Perform necessary preprocessing such as data cleaning and formatting to ensure data quality. For example, extract the data of the last week, clean the outliers, and format them into the feature vector required by the model. 4. Perform incremental learning: use the small batch gradient descent algorithm to optimize the model parameters. Divide the data into multiple small batches, each containing 100 samples. For each batch of data, calculate the loss function (such as mean square error or cross-entropy loss) of the model, and update the model parameters according to the gradient of the loss function. The update formula is: . Where θ is the model parameter, η is the learning rate, and ∇L is the gradient of the loss function. Through iterative updating, the prediction deviation of the model is gradually reduced. 5. Verify the optimization effect: use independent validation data set to evaluate the performance of the optimized model. If the prediction deviation index of the optimized model is reduced to 0.04, it indicates that the optimization effect is good; if it is still higher than the preset threshold value, you can adjust the learning rate or try other incremental learning algorithms. For example, if the optimized deviation index is still 0.06, you can adjust the learning rate to 0.005, or try online learning algorithm to further optimize the model.

[0117] Step Se, update the optimized model parameters to the online scheduling system for subsequent generation of prediction reports.

[0118] Update the optimized model parameters to the online scheduling system. The specific operation includes:

[0119] Stop updating: during system maintenance, deploy new model parameters to the online scheduling system to ensure that the updating process does not affect the normal operation of the system.

[0120] Hot update: if the system supports hot update, you can dynamically update the model parameters without interrupting the service. This usually requires the system to have a parameter hot loading mechanism.

[0121] Based on the spatiotemporal probability matrix of each mode and the preset community service strategy, the service time window priority value of each mode is calculated and generated, including:

[0122] Step S2A, based on the basic priority of each travel purpose mode defined in the community service policy, combined with the appearance probability value of each mode in the space-time probability matrix, the preliminary priority score is calculated through the weighted fusion algorithm.

[0123] Where, community service policy: a preset policy that defines the basic priority of different travel purpose modes. These priorities are based on the specific needs and service goals of the community, such as prioritizing student commuting and resident medical treatment, etc. Space-time probability matrix: a matrix generated by step S2d, recording the conditional appearance probability of each travel purpose mode at a specific station and time period, used for prediction and decision support. Weighted fusion algorithm: an algorithm that combines multiple features into a comprehensive score by assigning weights to different features. In this step, it is used to combine the basic priority and appearance probability value to calculate the preliminary priority score. Preliminary priority score: a score calculated based on the community service policy and the space-time probability matrix, used to evaluate the priority of each travel purpose mode.

[0124] The necessary process is as follows: 1. Obtain the basic priority: extract the basic priority of each travel purpose mode from the community service policy. These priorities are preset according to the specific needs and service goals of the community, for example, the basic priority of the school mode may be higher because student commuting is an important demand of the community. For example: the basic priority of the school mode in the community service policy is defined as 0.8, the basic priority of the work mode is 0.7, and the basic priority of the medical mode is 0.9. 2. Obtain the appearance probability value: extract the conditional appearance probability value of each travel purpose mode at a specific station and time period from the space-time probability matrix. These probability values reflect the frequency of each mode in actual operation. For example: the space-time probability matrix shows that the appearance probability of the school mode at the school station is 0.9 and the appearance probability of the work mode at the business district station is 0.85 during 7:00-9:00 in the morning on weekdays. 3. Calculate the preliminary priority score using the weighted fusion algorithm: combine the basic priority and appearance probability value to calculate the preliminary priority score using the weighted fusion algorithm. The specific formula is as follows: preliminary priority score = α × basic priority + (1-α) × appearance probability value. Where, α is the weight of the basic priority, usually set according to the importance of the community service policy. For example: assuming α = 0.6, for the school mode, the basic priority is 0.8 and the appearance probability value is 0.9, then the preliminary priority score is:

[0125] Preliminary priority score = 0.6 × 0.8 + 0.4 × 0.9 = 0.84.

[0126] 4. Output the preliminary priority score: output the calculated preliminary priority score in a structured data format for subsequent dynamic correction and optimization.

[0127] Step S2B, based on real-time collection of reservation request data, dynamically detects the service demand intensity changes of each travel purpose mode. When the demand intensity of a specific mode exceeds the set threshold value within the preset time window, a preset weight adjustment function is used to dynamically correct the preliminary priority score.

[0128] wherein the service demand intensity: the number or frequency of reservation requests for a specific travel purpose mode within a preset time window, reflecting the service demand intensity of that mode. The preset time window: a set time period for evaluating the service demand intensity of a specific travel purpose mode. For example, 7:00-9:00 in the morning on weekdays. The set threshold value: a preset value for determining whether the service demand intensity exceeds the normal range, thereby triggering dynamic correction of the priority score. The weight adjustment function: a preset function for adjusting the preliminary priority score according to the change in service demand intensity. It is usually an increasing function, and the higher the demand intensity, the higher the adjusted priority score.

[0129] The necessary process is as follows: 1. Real-time data collection and preprocessing: real-time collection of reservation request data from the community dedicated APP, extraction of information such as the timestamp, departure location and destination location of each request. Preprocess the data, including removing duplicate requests, filtering abnormal data, etc., to ensure the accuracy and usability of the data. 2. Service demand intensity detection: within the preset time window, count the number of reservation requests for each travel purpose mode and calculate the service demand intensity. For example, during 7:00-9:00 in the morning on weekdays, count the number of reservation requests for the school mode. Example: During 7:00-9:00 in the morning on weekdays, the number of reservation requests for the school mode is 120 times, and the number of reservation requests for the work mode is 80 times. 3. Determine whether the demand intensity exceeds the threshold value: compare the calculated service demand intensity with the preset threshold value. If the demand intensity exceeds the threshold value, it indicates that the service demand for that mode is high, and the preliminary priority score needs to be dynamically corrected. Example: The preset threshold value is 100 times, and the number of reservation requests for the school mode is 120 times, which exceeds the threshold value, triggering dynamic correction. 4. Dynamically correct the preliminary priority score: use the preset weight adjustment function to dynamically correct the preliminary priority score. The weight adjustment function is usually an increasing function, and the higher the demand intensity, the higher the adjusted priority score. Example: Suppose the weight adjustment function is f(x)=1+(x-threshold value)÷100, where x is the service demand intensity. For the school mode, the demand intensity is 120 times, and the threshold value is 100 times, so the adjusted weight is f(120)=1+100120-100=1.2. If the preliminary priority score for the school mode is 0.84, the adjusted priority score is:

[0130] The corrected priority score=0.84×1.2=1.008.

[0131] 5、Output the modified priority score in a structured data format for subsequent resource-constrained optimization.

[0132] Step S2C, based on the modified priority score, combine the current available capacity resource distribution, and through resource-constrained optimization algorithm for normalization processing, generate executable service time window priority value. The calculation of service time window priority value is the key step of algorithm output and field strategy fusion. Among them, the spatiotemporal probability matrix (the probability of each mode appearing in the algorithm output) and the community service strategy (the basic priority artificially preset) are fused by weighting. Specifically, the probability value provided by the algorithm reflects the dynamic demand intensity, which is used to modify the static strategy in real time, ensuring that the priority calculation has both policy guidance and responds to demand fluctuations in actual operation, so that the subsequent scheduling decisions (such as line optimization, skip station) have data-driven adaptive ability.

[0133] Among them, the current available capacity resource distribution: real-time updated bus vehicle distribution information, including vehicle position, state (free or passenger carrying), estimated arrival time, etc., used to evaluate the current capacity resources. Resource-constrained optimization algorithm: an algorithm used to normalize the priority score in the case of limited resources, ensuring that the generated priority value is executable in actual operation. Service time window priority value: the priority value after normalization processing, used to guide the scheduling decisions of the bus dispatching system within a specific time window.

[0134] The necessary process is as follows:

[0135] 1、Obtain the modified priority score and capacity resource distribution:

[0136] Get the modified priority score from step S2B, for example:

[0137] School mode: P1 = 1.008;

[0138] Work mode: P2 = 0.79;

[0139] Medical mode: P3 = 0.88;

[0140] At the same time, real-time acquisition of current capacity resource distribution, for example, there are 10 buses available, of which 5 are in the school mode area, 3 are in the work mode area, and 2 are in the medical mode area.

[0141] 2、Adjust and normalize the priority score:

[0142] Adjust the priority score according to the capacity proportion of each mode, the calculation formula is: . Among them, R i is the capacity proportion of mode i. The calculation result is:

[0143] School mode: P1'=1.008x0.5=0.504;

[0144] Work mode: P2'=0.79x0.3=0.237;

[0145] Medical mode: P3'=0.88x0.2=0.176.

[0146] Subsequently, normalization processing is performed to ensure that the priority value is between 0 and 1, and the normalization formula is:

[0147] where min(P')=0.176, max(P')=0.504. The calculation result is:

[0148] School mode: .

[0149] Work mode: .

[0150] Medical mode: .

[0151] 3. Generate service time window priority value: the normalized priority score is used as the final service time window priority value, which is used to guide the scheduling decision of the public transport scheduling system in a specific time window.

[0152] Step S2D, standardize and package the final generated service time window priority value.

[0153] The necessary process is as follows: obtain the service time window priority value from step S2C, for example: school mode 1.0, work mode 0.28, medical mode 0.0. Standardize and package these values, convert them into a format that the system can recognize, and add metadata such as timestamps and mode identifiers to ensure data integrity and availability. The packaged data is stored in the scheduling system database and can be accessed by the real-time scheduling module, thereby improving the accuracy and efficiency of scheduling decisions.

[0154] The route planning agent takes the passenger flow heat map and the space-time probability matrix as input, and optimizes the line sequence under the constraints of mandatory stop sites and vehicle capacity, including:

[0155] Step S31, extract the time-periodic service demand intensity of each station based on the passenger flow heat map, and combine the distribution law of travel purpose mode in the space-time probability matrix to construct a line optimization function, wherein the weight of each optimization objective is determined by a pre-set strategy parameter.

[0156] The necessary process is described as follows:

[0157] 1. Extract service demand intensity: Extract the service demand intensity of each station at different time periods from the passenger flow heat map. The passenger flow heat map shows the passenger flow density of each station at different time periods. By analyzing these data, the service demand intensity of each station at each time period can be determined. For example, the service demand intensity of station A is 80 people from 7:00 to 8:00 in the morning.

[0158] 2. Combine travel purpose mode distribution law: Use the travel purpose mode distribution law in the space-time probability matrix to further refine the service demand of each station. The space-time probability matrix provides the appearance probability of each travel purpose mode at different stations and time periods. Combining these information can more accurately assess the service demand. For example, the appearance probability of "school mode" of station A is 0.9 from 7:00 to 8:00 in the morning.

[0159] 3. Construct line optimization function: Based on the above data, construct the line optimization function. This function considers the service demand intensity and travel purpose mode distribution law to optimize the line sequence. The optimization objectives may include minimizing passenger waiting time, maximizing vehicle utilization, etc. The weights of each optimization objective are determined by preset strategy parameters.

[0160] 4. Determine the weight of optimization objective: According to the preset strategy parameters, determine the weight of each optimization objective in the line optimization function. For example, if the community service strategy prioritizes school travel, the weight of "school mode" may be higher. Suppose the weight of minimizing passenger waiting time is 0.6 and the weight of maximizing vehicle utilization is 0.4.

[0161] 5. Generate line optimization function: Integrate service demand intensity, travel purpose mode distribution law and optimization objective weight into line optimization function. For example, the line optimization function can be expressed as:

[0162] f(line)=α×passenger waiting time+β×vehicle utilization.

[0163] Where α and β are the weights of optimization objectives, corresponding to minimizing passenger waiting time and maximizing vehicle utilization respectively.

[0164] Step S32, taking the line optimization function as the fitness function, using the improved genetic algorithm to search the line sequence, embedding the fixed gene fragment of the must-stop station into the chromosome code in the population initialization stage.

[0165] Line optimization function: A mathematical function that considers service demand intensity and travel purpose mode distribution to optimize line sequences. Optimization objectives may include minimizing passenger waiting time, maximizing vehicle utilization, etc. Improved genetic algorithm: An optimization algorithm that simulates the process of biological evolution, gradually approaching the optimal solution through selection, crossover, and mutation operations. In path planning, genetic algorithms encode possible paths as chromosomes and find optimal paths through continuous evolution. Chromosome encoding: In genetic algorithms, possible paths are encoded as chromosomes. Each gene in the chromosome represents a station in the path.

[0166] The necessary process is as follows:

[0167] 1. Set fitness function: Use the line optimization function as the fitness function to measure the pros and cons of different line sequences. The design of the fitness function should combine optimization objectives such as minimizing passenger waiting time (T) and maximizing vehicle utilization (U). The fitness function can be expressed as:

[0168] Where α and β are the weights of the optimization objectives.

[0169] 2. Population initialization: In the population initialization stage, embed the mandatory stop stations as fixed gene fragments into the chromosome encoding. For example, if the mandatory stop stations are station A and station B, the chromosome encoding may be "start station - station A - station B - end station". This encoding method ensures that mandatory stop stations are included in all line sequences.

[0170] 3. Genetic algorithm iteration: Use the improved genetic algorithm to search for line sequences. In the iteration process, gradually optimize the line sequence through selection, crossover, and mutation operations. Selection operation selects high fitness individuals according to the fitness function; crossover operation generates new individuals by exchanging gene fragments; mutation operation introduces diversity by randomly changing gene fragments.

[0171] Step S33, in the process of genetic algorithm iteration, introduce Monte Carlo tree search strategy, based on population diversity index dynamic adjustment of genetic algorithm parameters, output preliminary optimization line sequence.

[0172] Where Monte Carlo tree search (MCTS): A sampling-based search algorithm that gradually builds a search tree through four steps of selection, expansion, simulation, and backtracking to find the optimal solution. Population diversity index: An index used to measure the difference between individuals in the population in genetic algorithms, such as the fitness distribution of the population, genetic diversity, etc.

[0173] The necessary process is as follows: 1. Introduce MCTS strategy: In the iteration of genetic algorithm, each partial solution is taken as a node of MCTS search tree, and the route sequence is dynamically explored through selection, expansion, simulation and backtracking steps. The UCB formula is used to select the node: . Wherein, is the average fitness of the node, N is the total number of simulations, n is the number of node visits, and c is the exploration parameter. This strategy enhances the exploration ability of the high-quality solution space. 2. Dynamically adjust the parameters: dynamically adjust the mutation probability of genetic algorithm according to the population diversity index (such as fitness standard deviation σ) . When σ is lower than the threshold, increase to introduce new gene combinations and avoid falling into local optimum.

[0174] 3. Output the preliminary optimized route sequence: combine the MCTS strategy and the dynamically adjusted parameters to output the preliminary optimized route sequence that meets the mandatory stop station constraint and optimizes the service quality, providing a basis for subsequent fine tuning.

[0175] Step S34, taking the preliminary optimized route sequence as input, fine-tuning is carried out by using the simulated annealing mechanism to generate new solutions through neighborhood search operations, and outputting the locally optimized route sequence.

[0176] Wherein, simulated annealing mechanism: an optimization algorithm based on the principle of solid-state annealing, which accepts inferior solutions with a certain probability in the search process by setting the initial temperature, cooling rate and termination condition, avoiding falling into local optimum. Neighborhood search operation: an operation that generates new solutions near the current solution, such as swapping the positions of two stations, reversing a certain path, inserting or deleting a station, etc. Locally optimized route sequence: the route sequence obtained after fine-tuning by simulated annealing, which has further improvement in service quality or efficiency compared with the preliminary optimized sequence.

[0177] The necessary process is as follows: 1. Initialize parameters: set the initial temperature T0, termination temperature T min , cooling rate α and maximum iteration number k max . Take the preliminary optimized route sequence as the initial solution X0, and calculate its objective function value E(X0) as the initial energy. 2. Generate new solutions X new in the neighborhood of the current solution X. Common operations include swapping the positions of two stations, reversing a certain path, etc. Calculate the objective function value E(X new ) and energy difference of the new solution: . 3. Acceptance criteria: if ΔE<0 (new solution is better), accept the new solution; otherwise, accept the inferior solution with a probability: .

[0178] 4. Cooling and iteration:

[0179] Gradually reduce the temperature according to the cooling rate α: .

[0180] 5. Output locally optimized circuit sequence: When the temperature drops to T min Or reach the maximum number of iterations k max Stop iterating when the time is right, and output the current optimal solution as the local optimization route sequence.

[0181] Step S35: Based on the locally optimized route sequence, verify the vehicle capacity constraint and service quality threshold, and output the optimal route sequence and operation indicators that meet the requirements.

[0182] The necessary process is as follows: 1. Verify vehicle capacity constraints: For each route in the locally optimized route sequence, check whether it meets the vehicle capacity constraints. Calculate the number of passengers boarding and alighting at each station on each route to ensure that the vehicle's passenger load at any given time does not exceed its maximum capacity. For example, if the maximum capacity of a vehicle on a certain route is 50 people, calculate the number of passengers boarding and alighting at each station to ensure that the vehicle's passenger load at any station does not exceed 50 people. 2. Verify service quality thresholds: Check whether the route sequence meets the preset service quality thresholds, such as average passenger waiting time and vehicle punctuality rate. For example, the preset average passenger waiting time is no more than 10 minutes. Through simulation, the actual average waiting time is calculated to be 8 minutes, which meets the service quality threshold. 3. Output optimal route sequence and operating indicators: For route sequences that meet the vehicle capacity constraints and service quality thresholds, output the optimal route sequence and provide corresponding operating indicators, such as total travel distance, total passenger waiting time, and vehicle utilization rate. For example, the final output optimal route sequence is "Start-Station A-Station B-Destination", and the operating indicators include a total travel distance of 10 kilometers, a total passenger waiting time of 50 minutes, and a vehicle utilization rate of 80%.

[0183] The station-hopping decision agent generates station-hopping instructions based on service time window priority values ​​and a competition depth Q-network, including:

[0184] Step S3a: Based on the service time window priority value, real-time carriage occupancy rate, and number of passengers waiting at the station, construct the current state for skipping stations. Wherein, real-time carriage occupancy rate: the ratio of the current vehicle's actual passenger capacity to its maximum passenger capacity, reflecting the degree of congestion. Number of passengers waiting at the station: the number of passengers waiting to board at the current station, which can be obtained through the station's real-time monitoring equipment. Current state for skipping stations: a state vector constructed by comprehensively considering the service time window priority value, real-time carriage occupancy rate, and number of passengers waiting at the station for skipping station decisions.

[0185] The necessary process is as follows: 1. Obtain the service time window priority value: Obtain the service time window priority value from step S2C, for example: school mode 1.0, work mode 0.28, medical treatment mode 0.0.

[0186] 2. Real-time car fullness rate: Real-time car fullness rate is obtained through sensors on the vehicle. For example, a vehicle currently carries 40 passengers, and the maximum number of passengers is 50, so the car fullness rate is 0.8. 3. Obtain the number of waiting passengers at the station: Obtain the number of waiting passengers through real-time monitoring equipment at the station. For example, there are currently 20 people waiting at a station. 4. Construct the current state of the skip-stop decision: Integrate the service time window priority value, real-time car fullness rate and the number of waiting passengers into a state vector S. For example:

[0187] S = [P 模式, car fullness rate, number of waiting passengers]. The specific value is: S = [1.0, 0.8, 20]. Wherein, P 模式 is the service time window priority value.

[0188] Step S3b, input the current state into the pre-trained competitive deep Q network, and calculate the action value of each candidate skip-stop action through the value function and advantage function of the competitive deep Q network.

[0189] Wherein, competitive deep Q network: a deep reinforcement learning algorithm that separates the value function and advantage function to improve the estimation accuracy of the action value. Value function: represents the expected future return under a given state. Advantage function: represents the additional return of taking a certain action relative to the average action under a given state. Action value: represents the expected return of taking a certain action under a given state.

[0190] The shared feature extraction module of the competitive deep Q network includes two fully connected layers: the first layer maps the state vector to 256 dimensions, and the second layer maps to 128 dimensions, both using the ReLU activation function. The value flow branch is a fully connected layer with input of 128 dimensions and output of 1 dimension. The advantage flow branch is a fully connected layer with input of 128 dimensions and output dimension equal to the number of candidate skip-stop actions.

[0191] Training parameters and process: The network uses the mean square error loss function, is trained by the Adam optimizer, and the initial learning rate is set to 0.0005. Training uses the experience replay mechanism, and the buffer capacity is 10,000 records; At the same time, a target network is used, and its parameters are updated once every 100 training iterations. The action selection uses the ε-greedy strategy, and the initial exploration rate is 1.0, which is linearly decayed to 0.01 within the first 80% of training steps. The discount factor is set to 0.99. During training, random sampling is performed from the buffer, and the batch size is fixed at 32.

[0192] The necessary process is as follows: 1. Input the current state: input the current state S constructed in step S3a into the pre-trained competitive deep Q network. For example, the current state S=[1.0, 0.8, 20] contains service time window priority value, real-time car full load rate and station waiting person number. 2. Calculate the value function and advantage function: the competitive deep Q network separates the value function V(S) and the advantage function A(S, a) through its network structure, where a represents the candidate skip station action. The network outputs the estimated value of the value function and the advantage function:

[0193] V(S)=value function value output by the network.

[0194] A(S, a)=advantage function value output by the network.

[0195] 3. Calculate the action value: calculate the action value Q(S, a) of each candidate skip station action according to the value function and the advantage function. The calculation formula of the action value is:

[0196] where N is the number of candidate actions.

[0197] Step S3c, according to the preset action selection strategy, generate the skip station instruction sequence based on the calculated action value.

[0198] The necessary process is as follows: 1. Select the action selection strategy: select the action selection method according to the preset strategy. For example, use the ε-greedy strategy to select the action with the highest action value in most cases, but randomly select other actions with a certain probability ε to maintain exploration. 2. Generate skip station instructions based on action values: generate skip station instructions according to the calculated action values Q(S, a) according to the preset action selection strategy. For example, if the ε-greedy strategy is used, select the skip station action with the highest action value as the instruction. 3. Generate the skip station instruction sequence: arrange the generated skip station instructions in order to form the skip station instruction sequence. For example, the generated skip station instruction sequence is "do not stop at station A, stop at station B, do not stop at station C".

[0199] Two agents cooperate through a shared critic network, and the global reward function of the critic network gives higher on-time rate weight to travel purpose modes with priority values higher than a set threshold, and jointly outputs a dynamic scheduling scheme including:

[0200] Step 1, time and space alignment and fusion of the optimal route sequence running indicators output by the route planning agent and the skip station instruction sequence output by the skip station decision-making agent, combined with the service time window priority value to construct a collaborative decision-making feature matrix.

[0201] The necessary process is as follows: 1. Spatiotemporal alignment fusion: the optimal route sequence running indicators output by the route planning agent are spatiotemporally aligned with the skip-stop instruction sequence output by the skip-stop decision-making agent. For example, for a certain route, the optimal route sequence is "starting point-site A-site B-end point", and the corresponding running indicators include a total travel distance of 10 kilometers and a total passenger waiting time of 50 minutes; the skip-stop instruction sequence is "stop-don't stop-stop". Align these information in time and space order to form a unified data structure. 2. Combine the service time window priority value: combine the aligned data with the service time window priority value to construct a collaborative decision-making feature matrix. For example, the service time window priority value is 1.0 for the school mode, 0.28 for the work mode, and 0.0 for the medical mode. These values are integrated into the feature matrix together with the running indicators and skip-stop instructions. 3. Construct a collaborative decision-making feature matrix: the collaborative decision-making feature matrix includes the optimal route sequence running indicators, the skip-stop instruction sequence, and the service time window priority value.

[0202] Step 2: input the collaborative decision-making feature matrix into the multi-head attention mechanism to generate a dimensionally compressed state representation, where the number of attention heads and the compression ratio are configured by preset parameters.

[0203] The necessary process is as follows: 1. Input the collaborative decision-making feature matrix: input the collaborative decision-making feature matrix constructed in step 1 into the multi-head attention mechanism. For example, the feature matrix includes route running indicators, skip-stop instructions, and service time window priority values. 2. Multi-head attention processing: the multi-head attention mechanism processes the input data simultaneously through multiple attention heads, and each attention head learns different features of the data. The number of attention heads (such as 8) and the compression ratio (such as 1 / 4) are preset to control the dimension of the output state representation. 3. Generate a dimensionally compressed state representation: the multi-head attention mechanism outputs a dimensionally compressed state representation that retains the key information of the input data. For example, if the input feature matrix has a dimension of 100 and the compression ratio is 1 / 4, the output state representation has a dimension of 25.

[0204] Step 3: input the state representation into the shared critic network to calculate the expected cumulative reward of the joint strategy through its value function module, wherein the reward function includes three differentiable sub-items of punctuality reward, efficiency reward, and comfort reward, and in the punctuality reward sub-item, the travel purpose mode with a service time window priority value higher than a set threshold is given a higher punctuality weight coefficient through a preset weight enhancement function, and the weight relationship of each sub-item is defined by a preset function.

[0205] The necessary procedures are as follows: 1. Input state representation: input the state representation generated in step 2 into the critic network. The state representation is a low-dimensional feature vector output by the multi-head attention mechanism, which retains the key information of the input data. 2. Calculate the expected cumulative reward: calculate the expected cumulative reward of the joint strategy through the value function module of the critic network. The reward function includes three differentiable sub-items: punctuality reward, efficiency reward, and comfort reward. 3. Define the reward function sub-items:

[0206] Punctuality reward: for travel purposes whose priority value is higher than the set threshold, a higher punctuality weight coefficient is given through a preset weight enhancement function. For example, if the priority value of the school mode is 1.0 and higher than the set threshold of 0.5, a higher weight is given.

[0207] Efficiency reward: based on the running efficiency of the vehicle, such as total travel distance and vehicle utilization rate.

[0208] Comfort reward: based on the comfort of passengers, such as average waiting time and car full load rate.

[0209] 4. Weight relationship definition:

[0210] The weight relationship of each sub-item is defined by a preset function. For example, the preset weight function is: w 准时性 =λ×priority value. w 效率 =μ. w 舒适度 =ν. Where λ, μ, and ν are preset weight coefficients.

[0211] 5. Output expected cumulative reward: the critic network outputs the expected cumulative reward of the joint strategy, which is used to evaluate the performance of the strategy. The calculation formula of the expected cumulative reward is:

[0212] R=w 准时性 ×R 准时性 +w 效率 ×R 效率 +w 舒适度 ×R 舒适度 . Where R 准时性 , R 效率 , and R 舒适度 are the values of punctuality reward, efficiency reward, and comfort reward, respectively.

[0213] Step 4, based on the expected cumulative reward, the multi-agent proximal policy optimization algorithm is used to update the policy network parameters to generate the updated policy network.

[0214] The necessary process is as follows: 1. Input the expected cumulative reward: input the expected cumulative reward calculated in step 3 into the multi-agent proximal policy optimization algorithm (MAPPO). The expected cumulative reward is used to evaluate the performance of the current policy and guide the update of the policy network parameters. 2. Calculate the policy gradient: the MAPPO algorithm updates the policy network parameters by calculating the policy gradient. The policy gradient represents the sensitivity of the policy performance to the network parameters and is used to guide the parameter update direction. The calculation formula of the policy gradient is: . Wherein, is the current policy, is the Q value of the state-action pair. 3. Update the policy network parameters: update the policy network parameters using the calculated policy gradient. The update formula is: ; wherein, a is the learning rate. 4. Generate the updated policy network: the updated policy network can generate a better policy to improve the performance of the agent. The updated policy network parameters are used for subsequent policy generation.

[0215] Step 5, based on the updated policy network, generate a candidate policy set containing multiple candidate policies through the Monte Carlo sampling method.

[0216] The necessary process is as follows: 1. Input the updated policy network: input the updated policy network generated in step 4 as input, which can generate the optimal policy based on the current state. 2. Monte Carlo sampling: use the Monte Carlo sampling method to generate multiple candidate policies from the policy network. Monte Carlo sampling generates samples from a probability distribution by random sampling, ensuring that the generated candidate policies have diversity. For example, randomly select 10 candidate policies from the policy network. 3. Generate the candidate policy set: group the generated multiple candidate policies into the candidate policy set. Each candidate policy contains a series of actions that indicate the vehicle's decision to stop or skip at each station.

[0217] Step 6, based on the preset service quality evaluation model, perform service quality quantitative calculation on each policy in the candidate policy set, including calculating the expected punctuality rate of the policy based on historical punctuality rate data, calculating the full load rate based on vehicle capacity and passenger flow data, and calculating the average waiting time of passengers based on the distance between stations and running speed.

[0218] The necessary procedures are as follows: 1. Input the candidate strategy set: input the candidate strategy set generated in step 5 into the preset service quality evaluation model. Each candidate strategy contains a series of actions indicating the vehicle's stop or skip decision at each station. 2. Calculate the expected punctuality rate: based on historical punctuality rate data, calculate the expected punctuality rate of each candidate strategy. For example, if historical data shows that the punctuality rate of a certain line is 90%, the expected punctuality rate of the strategy is also 90%. 3. Calculate the full load rate: based on vehicle capacity and passenger flow data, calculate the full load rate of each candidate strategy. For example, the maximum capacity of a certain vehicle is 50 people, and the current passenger load is 40 people, so the full load rate is 80%. 4. Calculate the average waiting time of passengers: based on the distance between stations and the running speed, calculate the average waiting time of passengers for each candidate strategy. For example, the distance between stations is 2 kilometers, and the vehicle running speed is 30 kilometers / hour, so the average waiting time of passengers is 4 minutes. 5. Generate service quality quantitative results: integrate the calculated expected punctuality rate, full load rate, and average waiting time of passengers into service quality quantitative results.

[0219] Step 7, compare the calculated service quality indicators with the preset threshold value, and use the constraint satisfaction algorithm to select the feasible strategy set from the candidate strategy set that meets all the indicators.

[0220] The necessary procedures are as follows: 1. Compare the preset threshold value: compare the service quality indicators (such as expected punctuality rate, full load rate, and average waiting time of passengers) of each candidate strategy calculated in step 6 with the preset threshold value. For example, the preset threshold value is expected punctuality rate ≥ 90%, full load rate ≤ 80%, and average waiting time of passengers ≤ 5 minutes. 2. Select feasible strategies: use the constraint satisfaction algorithm to check whether each candidate strategy meets all the preset threshold values. If it does, it is added to the feasible strategy set. For example, if the expected punctuality rate of candidate strategy 1 is 92%, the full load rate is 78%, and the average waiting time of passengers is 4 minutes, then the strategy meets all the preset threshold values and is added to the feasible strategy set.

[0221] Step 8, select the Pareto optimal solution from the feasible strategy set based on the multi-objective optimization algorithm, and output the coordinated scheduling scheme that meets the service quality requirements.

[0222] The necessary procedures are as follows: 1. Construct a multi-objective evaluation function: after inputting the feasible strategy set, construct an evaluation function containing three sub-targets: punctuality target f1 = 1 - punctuality rate, efficiency target f2 = full load rate, and comfort target f3 = average waiting time. Each sub-item is balanced through weight coefficients λ1, λ2, and λ3, and the weight relationship is calculated dynamically through a preset function . 1. Parameters for the strategy. 2. Perform NSGA-II optimization: Initialize the population size N=100, encode the feasible strategy set, with each individual representing a scheduling scheme. Generate offspring by simulating binary crossover (SBX) and polynomial mutation, setting the crossover probability to 0.9 and the mutation probability to 0.1. Use fast non-dominated sorting to stratify the population, calculating the crowding distance for individuals in the same stratum. 3. Selecting Pareto Optimal Solutions: After 200 iterations, individuals with a non-dominant level of 1 are extracted from the final population to form the Pareto front. For example, the front may contain 5 solutions:

[0223] Solution A: (On-time rate 92%, load factor 78%, waiting time 4 minutes).

[0224] Solution B: (On-time rate 90%, load factor 75%, waiting time 3.5 minutes).

[0225] Solution C: (On-time rate 88%, load factor 72%, waiting time 3 minutes) These solutions are all Pareto optimal, and it is impossible to further optimize any of the indicators without compromising other indicators.

[0226] 4. Decision-making and output: The final solution is selected from the Pareto front using a weighted summation method, with weights dynamically adjusted based on the current service priority. If the school-going mode has the highest priority, then solution A, which has a higher on-time rate weight, is selected as the final coordinated scheduling solution. The output includes a complete scheduling instruction containing the line sequence, skip station instructions, and time window configuration.

[0227] Based on the same inventive concept, embodiments of the present invention provide an intelligent dispatching decision support system for community bus routes, including a memory and a processor, wherein the memory stores information that can run on the processor to implement the following... Figure 1 and Figure 2 The procedure for the method shown.

[0228] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A smart scheduling decision support method for community bus routes, characterized in that, include: Collect and integrate historical passenger flow card swiping data from the payment system, real-time travel reservation request data from a dedicated application APP for community members, and static data containing community population structure and public facility distribution, and construct a travel demand dataset through spatiotemporal index alignment; Based on travel demand datasets and public facility distribution information, a clustering algorithm is used to identify travel purpose patterns with different spatiotemporal characteristics. Based on this, a subset of travel records corresponding to each pattern is divided to extract their spatiotemporal clustering features, time series evolution features, and spatial correlation features. These features are then input into a multi-head attention prediction model with integrated adaptive weights to generate a prediction report that includes time-segmented passenger flow heatmaps and spatiotemporal probability matrices for each pattern. Based on the spatiotemporal probability matrices of each pattern and the preset community service strategy, the priority values ​​of the service time window for each pattern are calculated and generated. Based on the prediction report and service time window priority values, a multi-agent collaborative decision-making framework is constructed. The route planning agent takes the passenger flow heat map and spatiotemporal probability matrix as input and optimizes the route sequence under the constraints of mandatory stops and vehicle capacity. The skip-stop decision agent generates skip-stop instructions based on the service time window priority values ​​and the competition depth Q network. The two agents coordinate strategies through a shared critic network. The global reward function of the critic network assigns higher on-time rate weights to travel destination patterns with priority values ​​higher than a set threshold, and jointly outputs a dynamic scheduling scheme. The dynamic scheduling scheme is converted into instructions and sent to the vehicle and passenger service terminals to complete real-time scheduling. Based on the spatiotemporal probability matrix of each mode and the preset community service strategy, the service time window priority values ​​for each mode are calculated and generated, including: Based on the basic priority of each travel destination mode defined in the community service strategy, and combined with the occurrence probability value of each mode in the spatiotemporal probability matrix, a preliminary priority score is calculated through a weighted fusion algorithm. Based on real-time collected reservation request data, the system dynamically detects changes in the intensity of service demand for each travel destination mode. When the intensity of demand for a specific mode exceeds a set threshold within a preset time window, a preset weight adjustment function is used to dynamically correct the initial priority score. Based on the corrected priority score and combined with the current distribution of available transportation resources, the priority values ​​of executable service time windows are generated through normalization processing using a resource constraint optimization algorithm. The final generated service time window priority values ​​are standardized and encapsulated.

2. The intelligent dispatching decision support method for community bus lines according to claim 1, characterized in that, Based on travel demand datasets and public facility distribution information, clustering algorithms are used to identify travel destination patterns with different spatiotemporal characteristics, including: Historical passenger flow card swipe data and real-time reservation request data are de-identified to generate anonymous travel trajectory records containing only departure time, departure location, and arrival time; A density-based spatiotemporal clustering algorithm is used to define a spatiotemporally coupled neighborhood with a preset spatial neighborhood radius and time window to cluster anonymous travel trajectory records and obtain multiple travel behavior clusters. Based on the distribution information of public facilities, the endpoint of the trajectory within each travel behavior cluster is spatially matched with public facilities within a preset distance range; Semantic annotation is performed based on the matching results: when the proportion of the number of matching trajectories between a certain type of public facility and a certain travel behavior cluster exceeds a preset threshold, the travel behavior cluster is labeled as a pattern with that type of facility as the travel purpose. Based on the annotation results, we obtain each travel behavior cluster with semantic travel purpose labels and its spatiotemporal characteristics.

3. The intelligent dispatching decision support method for community bus lines according to claim 2, characterized in that, Based on public facility distribution information, spatial matching is performed between the endpoint location of each travel behavior cluster's trajectory and public facilities within a preset distance range, including: Based on the functional type and scale attributes of public facilities, differentiated spatial impact radii are set to construct facility impact range models; For each travel behavior cluster, its trajectory endpoint is initially matched with the facility impact range model to generate a candidate set of destination facilities; then, using this candidate set as input, the actual path distance from each trajectory endpoint to the candidate facility is calculated based on road network data, precise matching is performed, and a list of candidate facilities and their precise path distances corresponding to each trajectory is output. For each trajectory, select the facility with the shortest actual path distance from the list of precise matches as its main destination. If the shortest path distance is less than a preset threshold, the trajectory is determined to be successfully associated with the facility. For each travel behavior cluster, the number of all successfully associated trajectories and the corresponding number of different types of public facilities are counted to form a facility matching statistical matrix.

4. The intelligent dispatching decision support method for community bus lines according to claim 1, characterized in that, The generated forecast report includes time-segmented passenger flow heatmaps and spatiotemporal probability matrices for each mode, and includes: Based on the travel record subsets corresponding to each travel destination mode, multimodal feature extraction technology is used to obtain spatiotemporal clustering features, time series evolution features and spatial correlation features in parallel. The above features are then fused into a unified multimodal feature representation through a feature fusion algorithm based on attention weight. The multimodal feature representation is input into the multi-head attention prediction model. Combined with prior knowledge of the spatiotemporal distribution of community passenger flow, the importance weights of each feature dimension are dynamically calculated through the adaptive weighting mechanism in the prediction model to generate a feature weight distribution matrix. Based on the feature weight distribution matrix, a spatiotemporal graph attention network is used to capture the spatiotemporal dependencies between different travel destination patterns. A deep neural network model is used to predict the passenger flow density distribution of each station at different times, generating a time-segmented passenger flow heat map. Using passenger flow heatmaps as input, a probability calculation framework based on Bayesian inference is introduced. Combining the historical spatiotemporal distribution patterns of various travel destinations, the probability of conditional occurrence of each mode at specific stations and time periods is calculated, and a complete spatiotemporal probability matrix is ​​constructed. The generated time-segmented passenger flow heatmaps are integrated with the spatiotemporal probability matrices of each mode and packaged into a structured prediction report.

5. The intelligent dispatching decision support method for community bus lines according to claim 4, characterized in that, It also includes steps for continuous optimization of the multi-head attention prediction model: Based on vehicle GPS trajectory data and station passenger flow data collected during actual operation, a heat map of actual passenger flow distribution and an actual pattern distribution matrix corresponding to the actual operation are reconstructed. Spatial feature differences are calculated between the passenger flow heatmap in the forecast report and the actual passenger flow distribution heatmap to obtain the heatmap difference degree; at the same time, probability distribution differences are calculated between the spatiotemporal probability matrices of each mode in the forecast report and the actual mode distribution matrices to obtain the probability matrix difference degree. The heatmap difference and the probability matrix difference are combined using a weighted fusion algorithm to generate a unified model prediction bias index. When the model prediction deviation index exceeds the preset threshold, the incremental learning algorithm is used to optimize and adjust the parameters in the multi-head attention prediction model. The optimized model parameters are updated to the online scheduling system for use in generating subsequent prediction reports.

6. The intelligent dispatching decision support method for community bus lines according to claim 1, characterized in that, The route planning agent takes passenger flow heatmaps and spatiotemporal probability matrices as inputs and optimizes route sequences under constraints of mandatory stops and vehicle capacity, including: Based on the passenger flow heat map, the service demand intensity of each station in different time periods is extracted. Combined with the distribution pattern of travel destination in the spatiotemporal probability matrix, a route optimization function is constructed, in which the weight of each optimization objective is determined by preset strategy parameters. Using the route optimization function as the fitness function, an improved genetic algorithm is used to search for the route sequence. During the population initialization stage, the mandatory stopping stations are embedded into the chromosome encoding as fixed gene segments. A Monte Carlo tree search strategy is introduced during the iteration of the genetic algorithm. The parameters of the genetic algorithm are dynamically adjusted based on the population diversity index, and a preliminary optimized route sequence is output. The preliminary optimized route sequence is taken as input, and the simulated annealing mechanism is used for fine-tuning. A new solution is generated through neighborhood search operation, and the locally optimized route sequence is output. Based on locally optimized route sequences, the vehicle capacity constraints and service quality thresholds are verified, and the optimal route sequence and operating indicators that meet the requirements are output.

7. The intelligent dispatching decision support method for community bus lines according to claim 6, characterized in that, The station-hopping decision agent generates station-hopping instructions based on service time window priority values ​​and a competition depth Q-network, including: Based on the service time window priority value, real-time carriage occupancy rate and the number of people waiting at the station, the current state of the skip station decision is constructed; The current state is input into a pre-trained competitive deep Q-network, and the action value of each candidate jump station action is calculated through the value function and advantage function of the competitive deep Q-network. Based on the preset action selection strategy, a sequence of jump station instructions is generated based on the calculated action value.

8. An intelligent dispatching decision support system for community bus routes, characterized in that, It includes a memory, a processor, and a program stored in the memory and executable on the processor, which, when loaded and executed by the processor, implements the intelligent dispatching decision support method for community bus lines as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • DAS driving strategy optimization method driven by subway line real-time data

    CN120363970A

  • Intelligent bus combination scheduling method and device and storage medium

    CN120636190A