Intelligent bus scheduling method and device based on big data and mcp protocol, medium and program product

By combining large language models and the MCP protocol, intelligent bus scheduling has been achieved, solving the problem of insufficient human experience and improving the operational efficiency of the bus system and passenger experience.

CN121638749APending Publication Date: 2026-03-10南京行者易智能交通科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511712981.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The current bus scheduling relies on manual experience, which makes it difficult to accurately match the dynamic changes in passenger flow, resulting in uncontrollable waiting times and uneven resource allocation, affecting passenger experience and operational efficiency.

Method used

By combining large language models and the MCP protocol, and through multi-source data integration and intelligent decision-making, an intelligent scheduling plan is generated, including data acquisition, predictive analysis and optimization calculation, to form the optimal departure timetable and scheduling plan.

Benefits of technology

It enables precise response to passenger flow dynamics, optimizes the allocation of operational resources, improves passenger experience and operational efficiency, reduces waiting time and resource waste, and ensures drivers get adequate rest.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638749A_ABST
    Figure CN121638749A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent bus scheduling method based on big data and an mcp protocol. The intelligent bus scheduling method comprises the seven steps of S1, obtaining a natural language demand of a user; s2, performing cue word optimization on the demand input by the user by utilizing a prompt function of an mcp protocol; s3, calling a data acquisition tool in the mcp server by using the large model to acquire multi-source data required by scheduling optimization; s4, calling a prediction tool and a clustering tool in the mcp server by using the large model, predicting passenger flow and dividing time periods; s5, calling a time table generation tool in the mcp server by the large model, and generating an optimal departure time table; s6, calling a scheduling generation tool in the mcp server by the large model to generate an optimal scheduling plan; and S7, summarizing and outputting the whole scheduling plan. According to the invention, intellectualization and automation of bus scheduling are realized, and the scheduling efficiency and scientificity are greatly improved.
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 public transport scheduling method, device, medium and program product based on big data and mcp protocol. BACKGROUND

[0002] With the acceleration of urbanization process in China, the public transportation system is facing the dual challenges of increasing service demand and operational efficiency improvement. Among various public transportation modes, conventional public transport is still an important pillar of urban passenger transport system. However, the current public transport scheduling work in most cities in China still mainly relies on the experience of dispatchers, and this traditional mode has the following significant defects:

[0003] 1. At the passenger service level, the experience-based scheduling is difficult to accurately match the dynamically changing passenger flow rules, resulting in uncontrollable waiting time, frequent "string car" and "large interval" phenomena. The lack of supply of transport capacity during peak hours causes crowded carriages, while the excess of transport capacity during off-peak hours leads to idle resources, and the resource application efficiency needs to be improved.

[0004] 2. At the operational management level, manual scheduling is difficult to achieve scientific allocation of vehicle and driver resources. On the one hand, some drivers have excessive work intensity and there is a risk of overtime work, while some drivers are relatively idle, resulting in uneven operational efficiency; on the other hand, it is difficult to systematically guarantee the reasonable meal and rest rights of drivers in the scheduling scheme, affecting operational safety and service quality.

[0005] Therefore, how to build an intelligent scheduling method that can accurately respond to passenger flow dynamics while optimizing operational resource allocation has become a key technical problem to improve the efficiency of public transport operation.

[0006] In recent years, the development of intelligent interaction technologies such as large language models (LLM) and model context protocols (mcp) has provided a new solution path to break through the above problems. Large language models have strong natural language understanding and logical reasoning capabilities, and the mcp protocol, as a new standard interface protocol, provides architectural support for the deep integration of large models and professional tools. It adopts a client-server architecture and encapsulates three types of core functional components through a standardized interface: tools - providing data acquisition, predictive analysis, optimization calculation, and other executable functions; prompts - pre-defined structured task templates to ensure interaction standardization; resources - interfacing with multiple data sources. This architecture enables large models to flexibly schedule various professional tools through a unified protocol, forming a collaborative intelligent system.

[0007] Based on the above technical development, the application combines the cognitive decision-making ability of a large model with the standardized tool scheduling ability of the mcp protocol to build a complete intelligent scheduling solution. Through the mcp protocol, real-time integration of multi-source heterogeneous data such as passenger flow, weather, holidays, and line operation status can be achieved. Through the powerful data understanding and reasoning ability of the large model, after comprehensive analysis of the above data, the mcp tool can automatically generate an intelligent scheduling scheme.

[0008] This intelligent scheduling method based on a large model and the mcp protocol breaks through the limitations of traditional experience-driven methods, realizes the evolution from experience-driven to data-driven to intelligent generation, and provides more flexible, accurate, and efficient scheduling decision support for the public transportation industry. SUMMARY

[0009] In order to overcome the shortcomings of the prior art, the application proposes an intelligent public transportation scheduling method based on big data and the mcp protocol, characterized by the following steps:

[0010] Step S1: Obtain the user's input natural language requirements;

[0011] Step S2: Optimize the user's input requirements for prompt words, combine the user's input with the preset prompt word template through the prompt function of the mcp protocol, and the prompt word template includes the constraint conditions required for scheduling optimization. When the user does not provide the key constraint conditions, the interactive completion mechanism is triggered;

[0012] Step S3: According to the parameters determined by the standardized prompt words generated in step S2, use the large model to call the data acquisition tool in the mcp server to collect multi-source data required for scheduling optimization, including line basic information, line passenger flow, station passenger flow, OD passenger flow, line route, and current scheduling scheme;

[0013] Step S4: According to the multi-source data collected in step S3, use the large model to call the prediction tool in the mcp server to predict future passenger flow related data for a period of time, including line passenger flow, station passenger flow, OD passenger flow, and line route. The clustering tool in the mcp server divides the whole day operation time into multiple time periods, so that the fluctuation or variance of line passenger flow in each time period is minimized;

[0014] Step S5: Take the multiple time periods and the future passenger flow related data for a period of time obtained in step S4 as input, and use the large model to call the timetable generation tool in the mcp server to calculate the departure interval of each time period and form the optimal departure timetable;

[0015] The execution process of the timetable generation tool includes the following steps:

[0016] Step S5.1, an optimization model is established to minimize the total cost, and the constraint conditions are determined;

[0017] Step S5.2, the optimization model described in step S5.1 is solved by using a particle swarm algorithm to obtain the departure interval of each time period;

[0018] Step S5.3, according to the departure interval described in step S5.2 and the line qualification described in step 4, an optimal departure timetable is formed;

[0019] Step S6: taking the departure timetable generated in step S5 as input, the scheduling generation tool in the mcp server is called by the large model to generate an optimal scheduling plan;

[0020] The execution process of the scheduling generation tool includes the following steps:

[0021] Step S6.1, a 0-1 programming model is designed, and the objective function is: ; Wherein N is the number of shifts in the optimal departure timetable generated in step S5, ;

[0022] Step S6.2, the model is solved by a cbc solver to obtain an optimal scheduling plan;

[0023] Step S7: the entire scheduling plan is summarized and output.

[0024] The application also provides an electronic device, comprising:

[0025] A memory for storing a computer program;

[0026] A processor for executing the program stored on the memory to implement the method steps described above.

[0027] The application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method steps described above.

[0028] The application also provides a computer program product, comprising a computer program, which is executed by a processor to implement the method steps described above.

[0029] Compared with the prior art, the intelligent public transport scheduling method based on big data and mcp protocol provided by the application has the following beneficial effects:

[0030] 1. Intelligent scheduling: through comprehensive analysis of multi-source data by a large model, an intelligent scheduling scheme conforming to passenger flow rules and operation requirements can be generated, avoiding errors caused by insufficient manual experience.

[0031] 2. Improve passenger experience: reduce waiting time during peak hours, alleviate "string car" and "large interval" problems; reduce empty running during off-peak hours, improve ride comfort and resource utilization.

[0032] 3. Optimize operational efficiency: combine multi-dimensional data accessed in real time with mcp protocol to achieve dynamic scheduling of vehicles and drivers, reducing operating costs and improving resource allocation efficiency.

[0033] 4. Humanized management: the large model fully considers the driver's work length and meal and rest needs when generating the scheme, avoiding overloading and improving driver satisfaction and labor protection level. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 The present application relates to an mcp architecture schematic diagram. DETAILED DESCRIPTION

[0035] According to the technical scheme of the present application, those skilled in the art can propose a variety of structural ways and implementation ways which can be replaced with each other without changing the spirit of the present application. Therefore, the following specific embodiments and drawings are only exemplary description of the technical scheme of the present application, and should not be regarded as the whole or as the limitation or restriction of the technical scheme of the present application.

[0036] The terms "step S1", "step S2", "step S3" and the like in the specification and claims of the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those described herein.

[0037] The present application provides an intelligent public transport scheduling method based on big data and mcp protocol, comprising the following steps:

[0038] Step S1: obtaining the natural language demand input by the user.

[0039] Step S2: prompting the user's input demand, i.e. converting the user's natural language demand into complete, standardized prompt words.

[0040] Specifically, the user input is combined with the preset prompt word template through the prompt function of the mcp protocol, and the prompt word template contains the constraint conditions required for scheduling optimization; when some key constraint conditions are not provided by the user (i.e. the input of the user is incomplete), an interactive completion mechanism is triggered.

[0041] The interactive completion mechanism includes: automatically generating default values or reasonable suggestions based on the prompt word template; and / or, issuing a supplementary inquiry to the user to guide the user to provide necessary parameters.

[0042] Preferably, the prompt word template can be set in the following manner:

[0043] Please optimize the scheduling of line {line}.

[0044] Integrate weather, date (whether it is a holiday), line operation, passenger flow data, etc. data and analyze combined with constraint conditions to optimize the current scheduling scheme and generate a specific scheduling timetable for the next week.

[0045] Constraint conditions include:

[0046] 1. Operation target

[0047] • Cost reduction and efficiency optimization ratio

[0048] • First and last shift time

[0049] 2. Departure frequency

[0050] • Maximum departure interval

[0051] • Minimum departure interval

[0052] • Single route board minimum number of shifts

[0053] • Single route board maximum number of shifts

[0054] 3. Resource limit

[0055] • Maximum number of drivers

[0056] • Maximum number of vehicles

[0057] • Maximum real load rate

[0058] • Minimum real load rate

[0059] 4. Data analysis range

[0060] • Analysis data date

[0061] 5. Driver work and meal constraints

[0062] • Work duration range

[0063] • Breakfast time period

[0064] • Lunch time period

[0065] • Dinner time period

[0066] • Meal duration range

[0067] 6. Rest constraint

[0068] • First and last stop rest length

[0069] In the above constraints, the single route board refers to a route board, that is, a set of bus shift lists executed by a bus in a day, and the single route board minimum shift quantity refers to the minimum number of bus shifts executed by a bus in a day, and the single route board maximum shift quantity refers to the maximum number of bus shifts executed by a bus in a day.

[0070] Step S3, collect multi-source data required for shift optimization.

[0071] Specifically, according to the parameters (for example, analysis data date) determined in the standardized prompt words generated in step S2, the corresponding data acquisition tool in the mcp server is called by using the large model to obtain the relevant data of the bus line in the specified time range.

[0072] The relevant data includes: line basic information, line passenger flow, (line) station passenger flow, OD passenger flow, line road quota, and current shift plan of the line. The line basic information includes fare, line mileage, number of stations, bus carrying capacity, company operating cost, and passenger waiting cost.

[0073] Among them, the large model can be any large language model with natural language understanding and tool calling capability, preferably, it can be deepseek, qwen, llama, etc.

[0074] The line passenger flow in public transportation operation analysis refers to the cumulative total of the number of boarding passengers at all stations on the entire bus line in a specific statistical period. For example, in the morning peak period of 07:00-08:00, the line passenger flow of the bus line is 1000 person-times after counting the entire line.

[0075] The station passenger flow in public transportation operation analysis refers specifically to the number of boarding passengers at a specific station on a certain line in a specific statistical period. For example, in the 07:00-08:00 period, the station passenger flow of the line is 10 person-times after counting.

[0076] The OD passenger flow, OD for short, refers to a data set recording the origin and destination of passengers, which can be used to analyze the spatial movement of passengers and is a key input for calculating cross-section passenger flow and optimizing lines and shifts.

[0077] The line road quota refers to the planned travel time required for a bus to complete a complete shift on the line.

[0078] The data acquisition tool is a data interface program for connecting and querying a database, a data API or a file system, and is realized based on a general data connection technology (such as JDBC, ODBC, RESTful API calling and the like).

[0079] Step S4, predicting passenger flow and dividing time periods.

[0080] Specifically, according to the multi-source data collected in step S3, the passenger flow prediction tool in the mcp server is called by using a large model to predict passenger flow related data in a future period of time (for example, if scheduling in the future one week is desired, data in the future one week needs to be predicted, and the future period of time is set to one week). The passenger flow related data includes line passenger flow, station passenger flow, OD passenger flow and line capacity data. Then, the clustering tool in the mcp server is called by using a large model to divide the whole day operation time into multiple time periods according to the law of change of the predicted line passenger flow with time, so that the fluctuation variance of the line passenger flow level in each time period is minimized.

[0081] The passenger flow prediction tool can use time series analysis (such as ARIMA, Prophet), regression model or neural network to predict passenger flow and capacity. The clustering tool can use Fisher optimal segmentation, K-Means, DBSCAN and other unsupervised learning algorithms for time period division. It should be noted that the data acquisition tool, the passenger flow prediction tool and the clustering tool integrated in the mcp server are functional modules for realizing the method of the present application. These tools are constructed based on existing algorithms or models, and a person skilled in the art can select or develop them according to their functional description.

[0082] Step S5, generating an optimal departure schedule.

[0083] Specifically, the I time periods obtained in step S4 and the predicted passenger flow related data (including line passenger flow, station passenger flow, OD passenger flow and line capacity data) in a future period of time (for example, one week in the future) are taken as inputs, and the schedule generation tool in the mcp server is called by using a large model for each time period to calculate the departure interval of each time period, and finally a departure schedule is formed. The function of the schedule generation tool is to generate a departure schedule, and it encapsulates programs for realizing steps S5.1-S5.3. The input of the tool is the I time periods obtained in step S4 and the predicted passenger flow related data in a future period of time. The output of the tool is a departure schedule. Specifically, the execution process of the schedule generation tool includes the following steps:

[0084] Step S5.1, establishing an optimization model with the objective of minimizing the total cost and determining the constraint conditions:

[0085] The objective function is:

[0086] ;

[0087] wherein, is the company operating cost weight coefficient, The value range of is [0, 1], when = 0 indicates only concern for passenger interests, when = 1 indicates only concern for company operating costs, is the company operating cost, , is the passenger waiting cost, ; wherein, is the single-kilometer operating cost, is the line mileage, is the time period length, is the departure interval of the time period, is the predicted line passenger flow in the time period, is the ticket price, is the passenger per-minute waiting cost.

[0088] The constraint conditions include:

[0089] (1) Load factor constraint: ; wherein, respectively represent the minimum and maximum load factors required by the line, represents the predicted line passenger flow in the time period, is the time period length, is the departure interval of the time period, is the bus load capacity, is the total number of line stations, is the average number of stations for passengers in the time period. This constraint ensures that the vehicle load factor is within a reasonable range.

[0090] (2) Up and down trip number constraint: This constraint ensures that the up and down direction capacity is basically balanced. represents the total number of departure trips in the up direction of a line throughout the day, represents the total number of departure trips in the down direction of a line throughout the day (the upper right corner marks 1 and 2 represent the up and down directions, respectively).

[0091] (3) Departure interval constraint: This constraint ensures that the headway is in a reasonable range. The headway of the i-th time period, is the acceptable minimum headway, is the acceptable maximum headway.

[0092] (4) Total number of trips constraint: This constraint ensures that the total number of trips is in a reasonable range. respectively represent the minimum total number of trips of a certain line in a day and the maximum total number of trips of a certain line in a day.

[0093] Step S5.2, solve the optimization model using a particle swarm algorithm to obtain the headway of each time period;

[0094] The particle swarm algorithm is a swarm intelligence-based optimization algorithm that simulates the foraging behavior of a bird swarm to find the global optimal solution. The reason for using this algorithm is that the model established in step S5.1 is a complex, nonlinear optimization problem with multiple constraints, and traditional mathematical methods may be difficult to solve. The particle swarm algorithm is good at global search in such a complex space and can efficiently find a very close optimal solution.

[0095] Step S5.3, form an optimal departure schedule table according to the headway obtained in step S5.2 and the line capacity data predicted in step 4.

[0096] The departure schedule table refers to a complete operation time arrangement table containing all trips of the bus line in the uplink and downlink directions.

[0097] For example, the bus regulations stipulate that the first uplink departure time is 6:00, and the line capacity is 30 minutes. The first trip of the uplink is 6:00-6:30. Assuming the headway is 10 minutes, the next departure time is 6:10, and the operation time of this trip is 6:10-6:40. In this way, the departure schedule table of the entire line in the uplink and downlink directions can be formed.

[0098] Step S6, generate an optimal scheduling plan.

[0099] The optimal departure schedule table generated in step S5 is input to the scheduling generation tool in the mcp server called by the large model to generate an optimal scheduling plan. The scheduling generation tool encapsulates the programs implementing steps S6.1-S6.2. The input of the tool is the optimal departure schedule table, and the output of the tool is the optimal scheduling plan.

[0100] Specifically, the execution process of the scheduling generation tool in the mcp server includes step S6.1, designing a 0-1 planning model. ​

[0101] 0-1 programming is a special form of integer programming, in which all decision variables can only take 0 or 1, usually used to represent binary decision problems such as "whether to choose" "whether to perform" "whether to enable" and so on.

[0102] First, define the scheduling elements involved in the model:

[0103] Shift, is a complete operation task of a bus vehicle according to the timetable from the starting station to the end station.

[0104] Shift chain, refers to a sequence of tasks formed by multiple shifts performed by the same operation resource (vehicle and driver) in time sequence.

[0105] A bus stop, refers to a list of shifts performed by a bus in a day, and the shift list is sorted in time sequence.

[0106] Generating a scheduling plan is actually to determine each bus stop, and the total number of bus stops corresponds to the number of buses and drivers needed to be invested (assuming that people and vehicles are bound). Therefore, by minimizing the number of bus stops, the optimal allocation of resources can be achieved. Let N be the total number of shifts in the optimal departure timetable generated in step S5, then the objective function is:

[0107] ; Where, When is 1, it represents the first shift of shift i.

[0108] Generating a complete bus stop also needs to ensure that the shift chain is continuous in time and has a clear beginning and end, so the first and last shift constraints are added: Where,

[0109] , is 1, representing shift j after shift i, is 0, representing no shift j after shift i;

[0110] , is 1, representing the last shift of shift i, is 0, representing no last shift of shift i;

[0111] denotes the set of predecessor shifts of shift i, denotes the set of successor shifts of shift i. The above constraints together determine the first and last shifts of a certain shift chain.

[0112] The above model can only obtain the solution with the minimum number of road signs, while actual road signs need to take into account drivers' rest time, meal time, and total working hours. Therefore, the following constraints are added:

[0113] (1) Number of shifts: ;

[0114] (2) Meal time guarantee constraints: This constraint prevents shifts with short rest intervals during meal times from forming a shift chain.

[0115] (3) Constraints on a single meal: This constraint avoids multiple long breaks within a shift chain, ensuring that only one meal is scheduled.

[0116] (4) Work restrictions during mealtimes: This constraint applies to drivers who start their shift during meal times, as they can eat before starting work and therefore are not required to schedule meal times in the shift chain.

[0117] (5) Restrictions on leaving get off work during mealtimes: This constraint applies to drivers who finish work during mealtimes; similarly, mealtimes are not mandatory.

[0118] In the above constraints, the variables To ensure the minimum number of trips for each road sign, It is a shift The start time, and Indicates the start and end times of the meal period. It is a shift and Rest intervals, It is the minimum dining time during the meal period.

[0119] Step S6.2: Solve the model using the CBC solver to obtain the optimal scheduling plan.

[0120] The CBC solver is an open-source 0-1 programming solver. Based on an optimization algorithm that combines branch and bound with cutting planes, the CBC solver can efficiently obtain near-optimal or globally optimal scheduling plans under constraints such as departure intervals, driver working hours, meal time windows, and vehicle limits.

[0121] Step 7: Compile and output the entire scheduling plan.

[0122] This application discloses a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, the above-described method steps are performed.

[0123] The embodiment of the application discloses a computer program product, when the computer program product is executed, the above-mentioned method steps are executed.

[0124] The embodiment of the application discloses an electronic device, the electronic device at least includes one memory, one processor, the computer program is deposited in the memory, the processor is used for executing the program deposited on the memory, and the above-mentioned method steps are realized.

[0125] The above has carried out the exemplary description to the application, obviously, the specific implementation of the application is not limited by the above-mentioned mode, any kind of non-essential improvement that uses the method concept and technical scheme of the application is carried out;Or without improvement, equivalent replacement, the above-mentioned concept and technical scheme of the application are directly applied to other occasions, all are within the protection scope of the application.

Claims

1. A smart bus scheduling method based on big data and mcp protocol, characterized in that, The method comprises the following steps: Step S1: obtaining a natural language requirement input by a user; Step S2: performing prompt word optimization on the requirement input by the user, combining the user input with a preset prompt word template through a prompt function of an mcp protocol, the prompt word template including constraint conditions required for shift optimization, and triggering an interactive completion mechanism when it is identified that a user does not provide a key constraint condition; Step S3: using a large model to call a data acquisition tool in an mcp server to collect multi-source data required for shift optimization according to parameters determined by the standardized prompt word generated in step S2, the multi-source data including line basic information, line passenger flow, station passenger flow, OD passenger flow, line route, and a current shift plan of the line; Step S4: using a large model to call a prediction tool in an mcp server to predict passenger flow related data in a future period of time according to the multi-source data collected in step S3, including line passenger flow, station passenger flow, OD passenger flow, and line route, and calling a clustering tool in the mcp server to divide the whole day operation time into multiple time periods so that the fluctuation or variance of line passenger flow in each time period is minimum; Step S5: taking the multiple time periods and the passenger flow related data in the future period of time obtained in step S4 as input, using a large model to call a timetable generation tool in an mcp server to calculate the departure interval of each time period and form an optimal departure timetable; The execution process of the timetable generation tool comprises the following steps: Step S5.1: establishing an optimization model with the minimum total cost as the target and determining constraint conditions; Step S5.2: using a particle swarm algorithm to solve the optimization model in step S5.1 to obtain the departure interval of each time period; Step S5.3: forming an optimal departure timetable according to the departure interval in step S5.2 and the line route in step 4; Step S6: taking the departure timetable generated in step S5 as input, using a large model to call a shift generation tool in an mcp server to generate an optimal shift plan; The execution process of the shift generation tool comprises the following steps: Step S6.1, design a 0-1 programming model, the objective function is: ; wherein, N is the number of shifts in the optimal departure schedule generated in step S5, ; Step S6.2: solving the model by a cbc solver to obtain an optimal shift plan; Step S7: summarizing and outputting the entire shift plan. 2.The intelligent public transport scheduling method based on big data and mcp protocol according to claim 1, characterized in that, The objective function of the optimization model in step S5.1 is: ; wherein, is a company operating cost weight coefficient, is in the range [0, 1]; is a company operating cost, , is a passenger waiting cost, ; wherein, is a single-kilometer operating cost, is a line mileage, is a first segment duration, is a first segment headway, is a first segment predicted line passenger flow, is a ticket price, is a passenger per-minute waiting cost. 3.The intelligent public transport scheduling method based on big data and MCP protocol according to claim 2, characterized in that, The constraint conditions in step S5.1 include real load rate constraints, up-and-down shift number constraints, departure interval constraints, and total shift number constraints; the real load rate constraint is, ; wherein, respectively represent the minimum and maximum real load rates required by the line, represents the predicted passenger flow of the line in the time period, is the length of the time period, is the headway of the time period, is the number of passengers that the bus can carry, is the total number of stops of the line, is the average number of stops that a passenger takes in the time period; The up-and-down class number constraint is, ; represents the total number of uplink train classes of a certain line throughout the day, represents the total number of downlink train classes of a certain line throughout the day; the headway constraint is that, ; the headway for a th time period, is an acceptable minimum headway, denotes an acceptable maximum headway; The total number of shifts constraint is, ; respectively represent the minimum total number of shifts of a line throughout the day and the maximum total number of shifts of a line throughout the day.

4. The intelligent public transport scheduling method based on big data and mcp protocol according to claim 3, characterized in that, The prompt word template in step 2 is set as follows: please optimize the scheduling of the {line} line, analyze the data such as weather, date, line operation, passenger flow data, and combine constraint conditions to optimize the current scheduling scheme, and generate a specific scheduling timetable for the next week; wherein the constraint conditions include: operation targets including cost reduction and efficiency optimization ratio and first and last shift time; departure frequency including maximum departure interval, minimum departure interval, single route board minimum number of shifts and single route board maximum number of shifts; resource limits including maximum number of drivers, maximum number of vehicles, maximum load rate and minimum load rate; data analysis range including analysis data date; driver work and meal constraints including work duration range, breakfast time period, lunch time period, dinner time period and meal duration range; and rest constraints including first and last station rest duration.

5. An electronic device, comprising: a memory for storing a computer program; a processor for executing the program stored on the memory to implement the method steps of any one of claims 1-4.

6. A computer readable storage medium, comprising: a computer program stored therein, wherein the computer program is executed by a processor to implement the method steps of any one of claims 1-4. The computer program is executed by a processor to implement the method of any one of claims 1-4.

7. A computer program product comprising a computer program, characterized in that, ​