Transport capacity scheduling scheme generation method and device, storage medium and electronic equipment

By using the MCP protocol and RAG mechanism, a unified capacity scheduling scheme that integrates multi-source data and injects it into a large language model solves the problems of manual dependence and insufficient adaptability of traditional algorithms in existing technologies, and realizes the generation of capacity scheduling schemes that can flexibly adapt to real-time changes.

CN121279720APending Publication Date: 2026-01-06ZHEJIANG ZHIPU XINPIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511457763.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing capacity scheduling solutions rely heavily on human experience, resulting in slow response times, high labor costs, and susceptibility to subjective factors. Furthermore, traditional algorithms cannot flexibly adapt to real-time multi-variable scenarios, have weak dynamic adjustment capabilities, and struggle to cope with real-time changing data environments.

Method used

By using the MCP protocol to uniformly access multi-source data and the RAG mechanism to retrieve multi-source capacity scheduling information from the server side, the system injects contextual knowledge from a large language model to generate scheduling schemes that adapt to various scenarios, reducing reliance on manual intervention and leveraging the powerful reasoning capabilities of the large model to handle real-time multivariate scenarios.

Benefits of technology

It enables flexible adaptation to real-time changing data environments, reduces reliance on manual intervention, has a wide range of applications, can automatically generate reasonable capacity scheduling schemes, and is adaptable to various scheduling scenarios, such as extreme weather.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121279720A_ABST
    Figure CN121279720A_ABST
Patent Text Reader

Abstract

The invention provides a transport capacity scheduling scheme generation method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining the task information of transport capacity scheduling; calling an MCP client according to the task information so as to send a query request corresponding to the task information to an MCP server; the MCP server is used for querying a corresponding multi-source knowledge base according to the query request, and generating and returning transport capacity scheduling multi-source information according to a query result; and taking the transport capacity scheduling multi-source information as a context of a large language model, and generating a transport capacity scheduling scheme corresponding to the task information according to the large language model. Uniform access of multi-source data is achieved through the MCP, domain knowledge is injected into a large model through an RAG mechanism, manual dependence can be reduced, and the method can adapt to various scheduling scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, storage medium, and electronic device for generating a transportation capacity scheduling scheme. Background Technology

[0002] Existing capacity scheduling solutions rely heavily on human experience, resulting in slow response times, high labor costs, and the risk of business disruption when staff are on leave or change. Furthermore, this manual decision-making approach is susceptible to subjective influences and has significant limitations.

[0003] Some related solutions employ traditional algorithms such as rule engines and static optimization models, which rely on fixed rules or historical data. These solutions cannot flexibly adapt to real-time changing data environments, have weak dynamic adjustment capabilities, and are difficult to cope with real-time multivariate scenarios. Summary of the Invention

[0004] To address the aforementioned problems, the present invention aims to provide a method, apparatus, storage medium, and electronic device for generating a transportation capacity scheduling scheme.

[0005] In a first aspect, embodiments of the present invention provide a method for generating a transportation capacity scheduling scheme, comprising: Obtain task information for capacity scheduling; The task information is used to invoke the MCP client to send a query request corresponding to the task information to the MCP server; the MCP server is used to query the corresponding multi-source knowledge base according to the query request, and generate and return multi-source capacity scheduling information based on the query results. The multi-source information on capacity scheduling is used as the context of a large language model, and a capacity scheduling scheme corresponding to the task information is generated based on the large language model.

[0006] In some optional implementations, the step of invoking the MCP client based on the task information to send a query request corresponding to the task information to the MCP server includes: Based on the task information, the task is split into multiple sub-tasks; The MCP client is invoked to send sub-query requests corresponding to each of the sub-tasks to the MCP server, instructing the MCP server to query the corresponding multi-source knowledge base according to each sub-query request, and to generate and return multi-source capacity scheduling information based on each query result.

[0007] In some optional implementations, the step of splitting the task based on the task information to generate multiple sub-tasks includes: The task information is subjected to intent recognition to determine the intent slot in the task information; The task is split according to each intent slot to generate a subtask corresponding to at least one intent slot.

[0008] In some optional implementations, the multi-source capacity scheduling information includes at least one capacity scheduling reference case; The process of the MCP server querying the multi-source knowledge base includes: Based on the query request, query the capacity scheduling cases in the multi-source knowledge base, and use the capacity scheduling cases that match the query request as the capacity scheduling reference cases.

[0009] In some optional implementations, the multi-source knowledge base includes an index database and a vector database; both the index database and the vector database store multiple capacity scheduling cases, and for the same capacity scheduling case, the index database and the vector database have the same case identifier; The step of querying capacity scheduling cases in a multi-source knowledge base according to the query request, and using the capacity scheduling cases that match the query request as the capacity scheduling reference cases, includes: Based on the query request, the index database is searched for conditions to filter out multiple first capacity scheduling cases related to the query request, and the case identifier of each first capacity scheduling case is determined. Determine a second capacity scheduling case that matches the case identifier of the first capacity scheduling case in the vector database; The query requests are sorted according to the semantic vector similarity between each second capacity scheduling case, and the top-ranked second capacity scheduling cases are used as capacity scheduling reference cases.

[0010] In some optional implementations, the method further includes: The MCP client is invoked according to the capacity scheduling scheme to send a tool invocation request corresponding to the capacity scheduling scheme to the MCP server; the MCP server is used to query a preset capacity scheduling toolset according to the tool invocation request, and generate and return a capacity scheduling action plan based on the query results. A capacity adjustment strategy is generated based on the aforementioned capacity scheduling action plan; In response to the report generation instruction, a capacity scheduling report containing the capacity adjustment strategy and the corresponding expected effects is generated.

[0011] In some optional implementations, the method further includes: In response to user feedback on the capacity scheduling scheme, the weight of the capacity scheduling scheme is determined based on the feedback. If the capacity scheduling scheme does not exist in the multi-source knowledge base, the weighted capacity scheduling scheme is stored as a capacity scheduling case in the multi-source knowledge base; the higher the weight of the capacity scheduling case, the greater the probability of it being selected.

[0012] Secondly, embodiments of the present invention also provide an apparatus for generating a transportation capacity scheduling scheme, comprising: The acquisition module is used to obtain task information for capacity scheduling. The query module is used to call the MCP client based on the task information to send a query request corresponding to the task information to the MCP server; the MCP server is used to query the corresponding multi-source knowledge base based on the query request, and generate and return multi-source capacity scheduling information based on the query results. The processing module is used to use the multi-source information on capacity scheduling as the context of a large language model, and to generate a capacity scheduling scheme corresponding to the task information based on the large language model.

[0013] Thirdly, embodiments of the present invention also provide a computer storage medium storing computer-executable instructions for the generation method of the capacity scheduling scheme described in any one of the above-mentioned methods.

[0014] Fourthly, embodiments of the present invention also provide an electronic device, comprising: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for generating the capacity scheduling scheme described above.

[0015] In the solution provided by the first aspect of this invention, unified access to multi-source data is achieved through the MCP protocol, and multi-source information on capacity scheduling can be retrieved from the server side using the RAG mechanism. This information is then injected into the contextual knowledge of the capacity scheduling scenario, and the powerful reasoning capabilities of the large model can be used to generate scheduling schemes for various scenarios, adapting flexibly to real-time changing data environments and handling real-time multivariate scenarios. This method achieves unified access to multi-source data through the MCP protocol without relying on manual cleaning and feature engineering; the use of the RAG mechanism to inject domain knowledge into the large model reduces manual dependence. This general framework for capacity scheduling can adapt to various scheduling scenarios (such as extreme weather), without requiring customized development for each scenario, and has a wide range of applications.

[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart of a method for generating a transportation capacity scheduling scheme provided by an embodiment of the present invention is shown; Figure 2 A flowchart illustrating another method for generating a transportation capacity scheduling scheme provided by an embodiment of the present invention is shown; Figure 3 This diagram illustrates the process of generating a transportation capacity scheduling scheme provided in an embodiment of the present invention. Figure 4 A schematic diagram of a device for generating a transportation capacity scheduling scheme provided in an embodiment of the present invention is shown; Figure 5 A schematic diagram of the structure of an electronic device for generating a capacity scheduling scheme, provided in an embodiment of the present invention, is shown. Detailed Implementation

[0019] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0020] Before providing a detailed description of the embodiments of the present invention, some of the nouns and terms involved in the embodiments of the present invention will be explained.

[0021] (1) MCP (Model Context Protocol): As an open protocol, MCP standardizes how applications provide context to large language models (LLMs). MCP provides a standard way to connect AI (artificial intelligence) models to different data sources and tools, including content repositories, business tools, and development environments.

[0022] (2) RAG (Retrieval-augmented Generation): Retrieval-augmented generation is a model that combines retrieval and generation techniques. It generates answers or content by referencing information from external knowledge bases, and has strong interpretability and customization capabilities. It is suitable for various natural language processing tasks such as question-answering systems, document generation, and intelligent assistants.

[0023] Transportation capacity scheduling refers to the rational allocation of transportation capacity based on constraints such as available resources, changes in the external environment, and unforeseen events, using algorithms, models, and human resources to meet transportation demand while simultaneously reducing costs and improving traffic efficiency. For example, during morning rush hour, capacity resources can be adaptively increased. Transportation capacity scheduling has wide applications in logistics, public transportation, aviation, rail, and shared mobility.

[0024] In the field of traffic scheduling, manual experience or a combination of traditional optimization algorithms (such as rule engines, linear programming, genetic algorithms, etc.) are commonly used.

[0025] Manual decision-making is slow to respond, has high labor costs, is easily affected by subjective factors, is difficult to optimize globally when faced with massive amounts of data, and is prone to overlooking some aspects (such as optimizing the load factor but ignoring the number of people stranded at the station), which has great limitations.

[0026] Traditional optimization algorithms rely on fixed rules or historical data, have weak dynamic adjustment capabilities, and struggle to cope with real-time multivariate scenarios. They cannot flexibly adapt to real-time changing data environments, resulting in the generation of dynamically optimal solutions. For example, different scheduling scenarios (such as extreme weather or sudden congestion) require dedicated personnel to handle, lack systematic solutions, and are difficult to cope with the comprehensive analysis of multi-source data (weather, capacity, line congestion, etc.).

[0027] For example, scheduling actions can be triggered by predefined rules (such as "if congestion level > 3, then increase capacity by 10%)". This rule engine approach requires maintaining a large number of rules, resulting in high maintenance costs, and it cannot handle unforeseen complex scenarios (such as sudden events with multiple coupled factors).

[0028] For example, using traditional optimization models combined with manual intervention, a basic scheduling scheme can be generated using mixed-integer programming, which is then manually reviewed and executed. This method is computationally time-consuming, and the manual review process can easily become an efficiency bottleneck. Mixed-integer programming is a type of optimization problem widely used in resource allocation; its objective function and constraints are linear and include both continuous and integer variables. This method defines the constraints (resource limitations, minimum transportation demand, etc.) and variables (capacity resource variables, scenario variables) in capacity scheduling, and solves the objective function (minimizing capacity cost / maximizing traffic efficiency) to provide possible scheduling schemes.

[0029] With the development of artificial intelligence technology, some solutions provide corresponding prediction models based on supervised learning. For example, random forests or LSTM (Long Short-Term Memory) networks are used to predict local variables (such as vehicle arrival times) to assist human decision-making. This approach is limited to a single task (such as congestion prediction), lacks end-to-end autonomous decision-making capabilities, has poor global optimization capabilities, and cannot autonomously generate complete scheduling schemes.

[0030] In addition, historical data is generally multi-source heterogeneous data (such as weather, GPS trajectory, station monitoring, etc.). There are technical barriers to the integration and real-time analysis of multi-source heterogeneous data, which requires complex data cleaning and modeling processes.

[0031] This invention provides a method for generating capacity scheduling schemes. It achieves unified access to multi-source data through the MCP protocol and uses the RAG mechanism to inject contextual knowledge of the capacity scheduling scenario. Furthermore, it leverages the powerful reasoning capabilities of large models to generate scheduling schemes that adapt to various scenarios, enabling flexible adaptation to real-time changing data environments and handling real-time multivariate scenarios.

[0032] This invention provides a method for generating a transportation capacity scheduling scheme, see [link to relevant documentation]. Figure 1 As shown, the method includes the following steps.

[0033] Step 101: Obtain task information for capacity scheduling.

[0034] In this embodiment, when a user has a need for transportation capacity scheduling, they can input a corresponding task description based on their actual needs to obtain task information related to their needs. This task information can represent the user's task requirements.

[0035] For example, if a user needs to schedule buses in region A during the morning rush hour, they can input information such as "How should buses in region A be scheduled during the morning rush hour?"

[0036] In this embodiment, users (such as transportation dispatch staff) can directly input task information in text format; alternatively, users can also input relevant voice data, and the relevant task information can be extracted through voice recognition. This embodiment does not limit the method by which users input task information.

[0037] Step 102: Invoke the MCP client based on the task information to send a query request corresponding to the task information to the MCP server; the MCP server is used to query the corresponding multi-source knowledge base according to the query request, and generate and return multi-source capacity scheduling information based on the query results.

[0038] In this embodiment, the acquisition of multi-source data is achieved based on the MCP protocol.

[0039] Specifically, a client supporting the Model Context Protocol (MCP) is provided on one side of the large language model, namely the MCP Client, which enables interaction between the client and the large language model. Furthermore, a corresponding MCP Server is provided, which has a multi-source knowledge base, such as transportation capacity data sources, real-time traffic data sources, route data sources, and traffic scheduling domain knowledge sources, enabling the MCP Server to execute query tasks based on actual needs.

[0040] After obtaining the task information for capacity scheduling, the MCP client can be invoked to generate a corresponding query request. For example, the query request can be generated by the MCP client, or the Large Language Model (LLM) can generate a corresponding query request based on the task information and then send the query request to the MCP server using the MCP client.

[0041] After receiving a query request, the MCP server can query the multi-source knowledge base according to the query request, generate structured multi-source transportation capacity scheduling information based on the real-time weather information, real-time traffic information, etc., and return the multi-source transportation capacity scheduling information to the MCP client for use by the large language model.

[0042] Optionally, multiple MCP functions related to capacity scheduling can be pre-defined, and comments can be added to each MCP function. These comments are mainly used to indicate the specific role of the function, so that the large model on the server side can understand and call it.

[0043] In this embodiment, multiple utility functions, namely MCP functions, can be set for the MCP server. After the MCP server obtains a query request, it can determine the MCP function that matches the query request based on the comments of each MCP function, use these MCP functions as target MCP functions, and execute the query task by calling the target MCP functions to query the corresponding multi-source knowledge base according to the query request and obtain the corresponding query results.

[0044] For example, the MCP protocol can be used to encapsulate multi-source data interfaces (such as weather APIs, pedestrian flow information, etc.), define a unified data format and access permissions, and pre-define corresponding MCP functions. For instance, the MCP Server provides functions such as get_congestion_level(route_id) and get_station_crowding(station_id). If you need to query the congestion status of a certain road, you can call the MCP function get_congestion_level(route_id) and it can return a real-time congestion index (representing the congestion level of a certain road).

[0045] This embodiment employs MCP technology, which enables large models to use tool functions in complex scenarios, increases the tool reserves of large models in the field of traffic scheduling, and improves the interpretability of large models.

[0046] Step 103: Use the multi-source information of capacity scheduling as the context of the large language model, and generate the capacity scheduling scheme corresponding to the task information based on the large language model.

[0047] In this embodiment, the multi-source information on capacity scheduling retrieved from the multi-source knowledge base will be used as the context of the large language model, that is, as the background knowledge of the large language model, and will be input into the large language model together with the task information to generate the capacity scheduling scheme corresponding to the task information.

[0048] The large language model can be a model trained / fine-tuned based on capacity scheduling-related data, or it can be a general-purpose, high-performance large language model. Furthermore, the large language model can generate one or more capacity scheduling schemes; typically, it can output K capacity scheduling schemes for the user to choose from, where K ≥ 2.

[0049] For example, in response to the problem of "alleviating congestion at subway stations during the morning rush hour", a possible capacity scheduling plan could be: dispatching 5 additional spare vehicles, which is expected to reduce congestion by 30%.

[0050] This invention provides a method for generating capacity scheduling schemes. It achieves unified access to multi-source data through the MCP protocol and utilizes the RAG mechanism to retrieve multi-source capacity scheduling information from the server side. This information is then injected into the contextual knowledge of the capacity scheduling scenario. Furthermore, leveraging the powerful inference capabilities of a large model, it can generate scheduling schemes suitable for various scenarios, flexibly adapting to real-time changing data environments and handling real-time multivariate scenarios. This method achieves unified access to multi-source data through the MCP protocol, eliminating reliance on manual cleaning and feature engineering. The RAG mechanism injects domain knowledge into the large model, reducing manual intervention. This general framework for capacity scheduling can adapt to various scheduling scenarios (such as extreme weather), without requiring customized development for each scenario, thus having a wide range of applications.

[0051] This invention provides another method for generating a transportation capacity scheduling scheme, see [link to relevant documentation]. Figure 2 As shown, the method includes the following steps.

[0052] Step 201: Obtain task information for capacity scheduling.

[0053] Please see details Figure 1 The relevant description of step 101 in the illustrated embodiment will not be repeated here.

[0054] Step 202: Invoke the MCP client based on the task information to send a query request corresponding to the task information to the MCP server; the MCP server is used to query the corresponding multi-source knowledge base according to the query request, and generate and return multi-source capacity scheduling information based on the query results.

[0055] Specifically, step 202, "calling the MCP client based on the task information to send a query request corresponding to the task information to the MCP server," includes steps 2021 to 2022.

[0056] Step 2021: Split the task according to the task information to generate multiple sub-tasks.

[0057] In this embodiment, the tasks in the capacity scheduling scenario are generally complex scheduling tasks. To improve the accuracy of task processing and the interpretability of the final generated solution, the received task information can be split into multiple sub-tasks.

[0058] For example, to address the problem of congestion in a certain region or on a certain road, it can be broken down into multiple sub-tasks: Sub-task 1: Determine the location and scope of impact of the congestion / failure; Sub-task 2: Query scheduling cases of similar scenarios in history; Sub-task 3: Obtain current real-time traffic conditions / capacity data, etc.

[0059] Optionally, step 2021, "splitting the task according to the task information and generating multiple sub-tasks", may include steps A1 to A2.

[0060] Step A1: Perform intent recognition on the task information to determine the intent slots in the task information.

[0061] Step A2: Split the task according to each intent slot and generate a subtask corresponding to at least one intent slot.

[0062] In this embodiment, after receiving the task information of natural language, the large language model can autonomously decompose it into multiple sub-tasks (or sub-problems). During the decomposition process, a certain type of problem can be identified through intent recognition technology, and multiple sub-problems of that type of problem can be given according to rules, forming multiple sub-tasks.

[0063] Specifically, task information can fill multiple slots, where the information is related to the user's intent. For ease of description, these slots are referred to as intent slots. By splitting the task according to each intent slot, multiple subtasks can be generated, and each subtask corresponds to at least one intent slot.

[0064] For example, if a large model receives a natural language task such as "alleviating congestion at subway stations during morning rush hour," intent recognition can be used to set the intent slots to "alleviating congestion at [time][location]." This type of problem can then be divided into two sub-problems: 1. Analyzing indicators such as the number of people currently congested at [location] and vehicle turnover rate; 2. Predicting passenger flow changes at [time]. The words and slots for intent recognition need to be specifically designed based on traffic capacity scheduling.

[0065] Based on this, for example, two subtasks can be generated: Subtask 1: Analyze the current number of people stranded at the station and the vehicle occupancy rate.

[0066] Subtask 2: Predict passenger flow changes in the next hour.

[0067] Step 2022: Invoke the MCP client to send sub-query requests corresponding to each sub-task to the MCP server, instructing the MCP server to query the corresponding multi-source knowledge base according to each sub-query request, and generate and return multi-source capacity scheduling information based on each query result.

[0068] In this embodiment, for each subtask, a corresponding request for querying can be generated, namely a sub-query request; it can be understood that the query request corresponding to the task information includes each sub-query request.

[0069] For a given subquery request, the MCP server can also query one or more knowledge bases from the multi-source knowledge base based on that subquery request to obtain the corresponding query results. The MCP server can simply concatenate the query results of each subquery request into multi-source capacity scheduling information, or it can infer from the query results of each subquery request to generate more reasonable multi-source capacity scheduling information.

[0070] The capacity scheduling multi-source information returned by the MCP server is structured information, and it needs to be used as background knowledge for the large language model and input into the large language model. Therefore, the capacity scheduling multi-source information in JSON format can be output, which can directly generate prompts for the large language model to use.

[0071] In some optional implementations, the multi-source information for capacity scheduling may include real-time information, such as real-time weather and real-time traffic. Furthermore, the multi-source information for capacity scheduling may also include at least one capacity scheduling reference case, which is a capacity scheduling case queried from a multi-source database and used for reference by the large model.

[0072] Specifically, the process of the MCP server querying the multi-source knowledge base may include step B1.

[0073] Step B1: Query the capacity scheduling cases in the multi-source knowledge base according to the query request, and use the capacity scheduling cases that match the query request as the capacity scheduling reference cases.

[0074] In this embodiment, the MCP server's multi-source knowledge base contains a database for storing relevant cases, which contains a large number of capacity scheduling cases. After receiving a query request (or subquery request), the MCP server can query capacity scheduling cases in similar scenarios in the database, use them as reference cases, and add them to the multi-source capacity scheduling information. This allows the large language model to refer to historical capacity scheduling cases and generate a more suitable capacity scheduling solution for the current scenario.

[0075] Optionally, the multi-source knowledge base includes an index database and a vector database; both the index database and the vector database store multiple capacity scheduling cases, and for the same capacity scheduling case, they have the same case identifier in both the index database and the vector database.

[0076] In this embodiment, the multi-source knowledge base includes multiple databases to represent different types of data; Figure 3 The diagram illustrates the process of generating a capacity scheduling scheme, where, for example... Figure 3 As shown, the multi-source knowledge base on the MCP server side can include transportation capacity data sources, real-time traffic data sources, route data sources, and traffic scheduling domain knowledge sources. In addition, there are index databases and vector databases, which are redundant, differing only slightly in their query methods.

[0077] In an index database, data is typically stored in corresponding indexes. When querying data in the index database, fast retrieval can be achieved through the relevant indexes. For example, an index database could be an Elasticsearch database. A vector database, on the other hand, records semantic vectors corresponding to each data point. Semantic similarity is calculated using these semantic vectors to achieve semantic queries or semantic retrieval.

[0078] As shown above, the index database and the vector database are redundant, and for the same capacity scheduling case, they share the same case identifier (e.g., ID) in both databases. For example, for a historical capacity scheduling case, a globally unique case identifier can be set, and the case can be copied twice, stored in both the index database and the vector database respectively, achieving redundant storage. In this embodiment, the data redundancy between the index database and the vector database enables fast and accurate case retrieval.

[0079] Specifically, step B1, "querying capacity scheduling cases in the multi-source knowledge base according to the query request, and using the capacity scheduling cases that match the query request as capacity scheduling reference cases," may include steps B11 to B13.

[0080] Step B11: Perform conditional retrieval on the index database based on the query request, filter out multiple first capacity scheduling cases related to the query request, and determine the case identifier of each first capacity scheduling case.

[0081] Step B12: Determine the second capacity scheduling case that matches the case identifier of the first capacity scheduling case.

[0082] Step B13: Sort the query requests and each second capacity scheduling case according to their semantic vector similarity, and use the top-ranked second capacity scheduling cases as capacity scheduling reference cases.

[0083] In this embodiment, after receiving a query request, the MCP server first searches the index database (e.g., the ES database) according to the query request. Specifically, it can construct corresponding search conditions (e.g., search keywords, search expressions, etc.) based on the query request, and then search relevant indexes based on these search conditions. This allows for the rapid selection of multiple capacity scheduling cases related to the query request, i.e., the first capacity scheduling cases. Furthermore, as shown above, each capacity scheduling case recorded in the index database has a unique case identifier, and correspondingly, each first capacity scheduling case also has a corresponding case identifier.

[0084] After initially retrieving case identifiers for each first capacity scheduling case from the index database, these case identifiers can be used to locate the corresponding capacity scheduling case in the vector database, i.e., the second capacity scheduling case. It can be understood that each first capacity scheduling case and each corresponding second capacity scheduling case share the same case identifier; that is, each first capacity scheduling case and each second capacity scheduling case are the same case, only stored in different databases.

[0085] For each identified secondary capacity scheduling case, the vector database records the semantic vector of each case. By vectorizing the query request, the semantic vector corresponding to the query request can be obtained. Then, the similarity between the semantic vector of the query request and the semantic vector of each secondary capacity scheduling case can be calculated, i.e., semantic similarity. This allows for semantic ranking of the secondary capacity scheduling cases, for example, from high to low. This identifies the top-ranked secondary capacity scheduling cases and uses them as reference cases for capacity scheduling.

[0086] For example, by sorting the second capacity scheduling cases in descending order of semantic similarity, the first M second capacity scheduling cases can be used as reference cases for capacity scheduling, where M≥2.

[0087] For example, for the scheduling task of "bus dispatching plan in rainstorm weather", both the ES database and the vector database can be used at the same time. The ES database is searched according to structured conditions, and the vector database is searched according to semantic similarity.

[0088] For example, multiple scheduling schemes under "heavy rain" weather can be filtered out first through the ES database, and then scheduling schemes that semantically match "public transportation" can be retrieved through the vector database. Similar schemes can be selected based on semantic similarity. For each similar scheme retrieved (i.e., capacity scheduling reference cases), it can be provided to the large language model in the form of a Prompt, which can be used as background knowledge for the large language model to achieve in-context learning.

[0089] In this embodiment, the data is first searched using the ES database according to structured conditions to initially filter the data. Then, a vector database is used for semantic sorting. This not only enables fast retrieval but also achieves more accurate mixed retrieval, ensuring that the retrieval results can cover most of the user's needs. This is beneficial for providing the user with a suitable scheduling solution in the future.

[0090] Step 203: Use the multi-source information of capacity scheduling as the context of the large language model, and generate the capacity scheduling scheme corresponding to the task information based on the large language model.

[0091] Please see details Figure 1 The relevant description of step 103 in the illustrated embodiment will not be repeated here.

[0092] In some alternative implementations, the method may further include steps C1 to C2, and may also generate a corresponding report, i.e., may further include step C3.

[0093] Step C1: The MCP client is invoked according to the capacity scheduling plan to send a tool invocation request corresponding to the capacity scheduling plan to the MCP server; the MCP server is used to query the preset capacity scheduling toolset according to the tool invocation request, and generate and return the capacity scheduling action plan based on the query results.

[0094] Step C2: Generate a capacity adjustment strategy based on the capacity scheduling action plan.

[0095] In this embodiment, the capacity scheduling scheme mainly provides a scheduling direction and generally lacks specific action plans. The MCP server provides a capacity scheduling toolset, including dynamic route planning functions.

[0096] After generating the capacity scheduling plan, the MCP client can be invoked again to send a tool request to the MCP server, enabling the MCP server to query the capacity scheduling toolset and determine a suitable capacity scheduling action plan. Subsequently, the large language model can generate specific strategies for adjusting capacity based on the capacity scheduling action plan, i.e., capacity adjustment strategies, for use in actual scheduling decisions.

[0097] Step C3: In response to the report generation instruction, generate a capacity scheduling report that includes the capacity adjustment strategy and the corresponding expected effects.

[0098] In this embodiment, the large language model can output K capacity scheduling schemes, each of which is a contingency plan. Furthermore, the large language model can leverage its powerful explanatory capabilities to generate the rationale and expected effects for each scheme. For example, it provides a detailed reasoning and analysis process for each of the K capacity scheduling schemes. The generated capacity scheduling schemes can be provided to users and traffic decision-makers in real time to assist their decision-making.

[0099] Furthermore, when necessary, users can input a report generation command for a specific capacity scheduling scheme (e.g., a scheme selected by the user from K available schemes) if required. Upon receiving the command, the corresponding capacity scheduling report will be generated, which may include capacity adjustment strategies and expected outcomes. This report can be provided to decision-makers, transportation planners, algorithm engineers, etc., for subsequent processes such as capacity scheduling review, traffic optimization, future traffic planning, and optimization of large-scale model outputs.

[0100] For example, when a contingency plan needs to be generated, a Top-K capacity scheduling scheme based on reinforcement learning can be used, such as "Scheme A: Add 5 spare vehicles, expected to reduce congestion by 30%". When a report needs to be generated, a visual report containing capacity adjustment suggestions and expected results can be produced for use in subsequent processes.

[0101] In some alternative implementations, the method may further include steps D1 to D2.

[0102] Step D1: In response to user feedback on the capacity scheduling plan, determine the weight of the capacity scheduling plan based on the feedback results.

[0103] Step D2: If no capacity scheduling scheme exists in the multi-source knowledge base, the weighted capacity scheduling schemes are stored as capacity scheduling cases in the multi-source knowledge base; the higher the weight of a capacity scheduling case, the greater the probability of it being selected.

[0104] In this embodiment, the large language model can be post-trained, specifically including: SFT (Supervised Fine-Tuning), ReFT (Reinforced Fine-Tuning), etc. For example, iterative training can be performed based on user feedback.

[0105] Furthermore, users can provide feedback on the capacity scheduling plans generated by the large model, allowing the system to assign appropriate weights to these plans based on the user feedback. For example, a positive feedback result can be assigned a larger weight, while a negative feedback result can be assigned a smaller weight.

[0106] Furthermore, for capacity scheduling schemes with weights, they can be used as capacity scheduling cases and stored in a multi-source knowledge base. When querying the multi-source knowledge base later, the capacity scheduling scheme can also be used as a query object. The higher the weight of the capacity scheduling case, the greater the probability of it being selected, that is, the more likely it is to be selected as a reference case.

[0107] Specifically, user feedback on recommended solutions is fed back to the system to optimize the priority of the large model's suggestion process and knowledge base. Cases stored in the knowledge base are scored based on user feedback to the model, and these scores are assigned weights for ranking during subsequent knowledge base searches. For example, if a capacity scheduling plan includes multiple options, and in option A, a user chooses option a from options a, b, and c, then the weight [Aa] is appropriately increased, while the weights of the other two options [Ab] and [Ac] are appropriately decreased. Therefore, during subsequent searches based on RAG technology, the ranking can be based on these weighted scores, making option a more likely to be selected.

[0108] by Figure 3 Taking the example shown, after a user inputs their task requirements, the system breaks down the task into sub-tasks based on intent analysis. For each sub-task, a corresponding request can be sent to the MCP server, enabling MCP function calls. The MCP server can provide internal information retrieval services within the transportation sector using RAG retrieval, or external information retrieval services using web page retrieval, such as retrieving information related to weather, trending events, and emergencies. Based on the information fed back from the MCP server using a large language model, deep thinking can be performed to deduce suitable scheduling solutions. This large language model can provide single-step rapid reasoning and planning capabilities, as well as multi-step reasoning and planning / proactive reflection capabilities. Furthermore, it can invoke transportation scheduling toolsets through MCP function calls to execute action plan paths, ultimately generating top-k contingency plans or capacity scheduling reports.

[0109] The capacity scheduling scheme generation method provided in this invention achieves unified access to multi-source data through the MCP protocol, providing structured data for large models and facilitating the addition of new data sources or scheduling rules, thus exhibiting strong scalability. It injects domain knowledge into the large model using the RAG mechanism, reducing reliance on manual intervention, and its general framework adapts to various scheduling scenarios. Interpretability is provided through problem decomposition and tool call chains, enabling reasonable scheduling recommendations and reports based on the large model. Finally, the large model undergoes post-training based on feedback results, enhancing its capabilities. This method automates the process from understanding the user's problem to outputting a solution. The large model integrates key technologies such as MCP, RAG, post-training, intent recognition, contextual learning, and thought chains, and is applied to transportation capacity scheduling, achieving optimized integration and innovative application of multiple technology links within the large model.

[0110] The above details the method and process for generating a transportation capacity scheduling scheme. This method can also be implemented using a corresponding device, the structure and function of which will be described in detail below.

[0111] Based on the same inventive concept, embodiments of the present invention also provide an apparatus for generating a transportation capacity scheduling scheme, see [link to relevant documentation]. Figure 4 As shown, the device includes: Module 401 is used to obtain task information for capacity scheduling; The query module 402 is used to call the MCP client according to the task information to send a query request corresponding to the task information to the MCP server; the MCP server is used to query the corresponding multi-source knowledge base according to the query request, and generate and return multi-source capacity scheduling information according to the query results. The processing module 403 is used to use the multi-source information of transportation capacity scheduling as the context of a large language model, and generate a transportation capacity scheduling scheme corresponding to the task information based on the large language model.

[0112] In some optional implementations, the query module 402 invokes the MCP client based on the task information to send a query request corresponding to the task information to the MCP server, including: Based on the task information, the task is split into multiple sub-tasks; The MCP client is invoked to send sub-query requests corresponding to each of the sub-tasks to the MCP server, instructing the MCP server to query the corresponding multi-source knowledge base according to each sub-query request, and to generate and return multi-source capacity scheduling information based on each query result.

[0113] In some optional implementations, the query module 402 splits the task according to the task information, generating multiple sub-tasks, including: The task information is subjected to intent recognition to determine the intent slot in the task information; The task is split according to each intent slot to generate a subtask corresponding to at least one intent slot.

[0114] In some optional implementations, the multi-source capacity scheduling information includes at least one capacity scheduling reference case; The process of the MCP server querying the multi-source knowledge base includes: Based on the query request, query the capacity scheduling cases in the multi-source knowledge base, and use the capacity scheduling cases that match the query request as the capacity scheduling reference cases.

[0115] In some optional implementations, the multi-source knowledge base includes an index database and a vector database; both the index database and the vector database store multiple capacity scheduling cases, and for the same capacity scheduling case, the index database and the vector database have the same case identifier; The step of querying capacity scheduling cases in a multi-source knowledge base according to the query request, and using the capacity scheduling cases that match the query request as the capacity scheduling reference cases, includes: Based on the query request, the index database is searched for conditions to filter out multiple first capacity scheduling cases related to the query request, and the case identifier of each first capacity scheduling case is determined. Determine a second capacity scheduling case that matches the case identifier of the first capacity scheduling case in the vector database; The query requests are sorted according to the semantic vector similarity between each second capacity scheduling case, and the top-ranked second capacity scheduling cases are used as capacity scheduling reference cases.

[0116] In some optional embodiments, the processing module 403 is further configured to: The MCP client is invoked according to the capacity scheduling scheme to send a tool invocation request corresponding to the capacity scheduling scheme to the MCP server; the MCP server is used to query a preset capacity scheduling toolset according to the tool invocation request, and generate and return a capacity scheduling action plan based on the query results. A capacity adjustment strategy is generated based on the aforementioned capacity scheduling action plan; In response to the report generation instruction, a capacity scheduling report containing the capacity adjustment strategy and the corresponding expected effects is generated.

[0117] In some optional embodiments, the processing module 403 is further configured to: In response to user feedback on the capacity scheduling scheme, the weight of the capacity scheduling scheme is determined based on the feedback. If the capacity scheduling scheme does not exist in the multi-source knowledge base, the weighted capacity scheduling scheme is stored as a capacity scheduling case in the multi-source knowledge base; the higher the weight of the capacity scheduling case, the greater the probability of it being selected.

[0118] This invention also provides a computer storage medium storing computer-executable instructions, including a program for executing the above-described method for generating a capacity scheduling scheme. These computer-executable instructions can execute the methods described in any of the above-described method embodiments.

[0119] The computer storage medium can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical storage (e.g., CD, DVD, BD, HVD), and semiconductor storage (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0120] Figure 5 A structural block diagram of an electronic device according to another embodiment of the present invention is shown. The electronic device 1100 may be a host server with computing capabilities, a personal computer (PC), or a portable computer or terminal, etc. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0121] The electronic device 1100 includes at least one processor 1110, a communications interface 1120, a memory array 1130, and a bus 1140. The processor 1110, the communications interface 1120, and the memory 1130 communicate with each other via the bus 1140.

[0122] The communication interface 1120 is used to communicate with network elements, including, for example, virtual machine management centers and shared storage.

[0123] Processor 1110 is used to execute programs. Processor 1110 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

[0124] Memory 1130 is used for executable instructions. Memory 1130 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device. Memory 1130 may also be a memory array. Memory 1130 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The instructions stored in memory 1130 can be executed by processor 1110 to enable processor 1110 to execute the capacity scheduling scheme generation method in any of the above method embodiments.

[0125] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating a capacity dispatching scheme, characterized in that, The method comprises the following steps: acquiring task information of capacity scheduling; calling an MCP client according to the task information to send a query request corresponding to the task information to an MCP server; the MCP server is configured to query a corresponding multi-source knowledge base according to the query request, generate and return capacity scheduling multi-source information according to the query result; the capacity scheduling multi-source information is used as a context of a large language model, and a capacity scheduling scheme corresponding to the task information is generated according to the large language model.

2. The method of claim 1, wherein, The step of calling the MCP client according to the task information to send the query request corresponding to the task information to the MCP server comprises the following steps: task splitting is performed according to the task information to generate a plurality of subtasks; the MCP client is called to send a sub-query request corresponding to each subtask to the MCP server, and the MCP server is instructed to query a corresponding multi-source knowledge base according to each sub-query request, and generate and return capacity scheduling multi-source information according to each query result.

3. The method of claim 2, wherein, The step of task splitting according to the task information to generate a plurality of subtasks comprises the following steps: intent slots in the task information are identified to determine the intent slots in the task information; task splitting is performed according to each intent slot to generate a subtask corresponding to at least one intent slot.

4. The method of claim 1, wherein, The capacity scheduling multi-source information comprises at least one capacity scheduling reference case; The process of querying the multi-source knowledge base by the MCP server comprises the following steps: capacity scheduling cases in the multi-source knowledge base are queried according to the query request, and capacity scheduling cases matching the query request are used as the capacity scheduling reference cases.

5. The method of claim 4, wherein, The multi-source knowledge base comprises an index database and a vector database; the index database and the vector database both store a plurality of capacity scheduling cases, and for the same capacity scheduling case, the index database and the vector database have the same case identifier; The step of querying the capacity scheduling cases in the multi-source knowledge base according to the query request, and using the capacity scheduling cases matching the query request as the capacity scheduling reference cases comprises the following steps: the index database is conditionally searched according to the query request to filter out a plurality of first capacity scheduling cases related to the query request, and the case identifiers of each first capacity scheduling case are determined; second capacity scheduling cases matching the case identifiers of the first capacity scheduling cases in the vector database are determined; the semantic vector similarity between the query request and each second capacity scheduling case is sorted, and the plurality of second capacity scheduling cases at the top of the sorting are used as the capacity scheduling reference cases.

6. The method of claim 1, wherein, The method further comprises the following steps: the MCP client is called according to the capacity scheduling scheme to send a tool calling request corresponding to the capacity scheduling scheme to the MCP server; the MCP server is configured to query a preset capacity scheduling tool set according to the tool calling request, generate and return a capacity scheduling action plan according to the query result; a capacity adjustment strategy is generated according to the capacity scheduling action plan; In response to the report generation instruction, a transport capacity scheduling report containing the transport capacity adjustment strategy and the corresponding expected effect is generated.

7. The method of claim 1, wherein, The method further includes: In response to user feedback on the transport capacity scheduling scheme, determining a weight of the transport capacity scheduling scheme according to the feedback; In the case where the transport capacity scheduling scheme does not exist in the multi-source knowledge base, the transport capacity scheduling scheme with the weight is stored in the multi-source knowledge base as a transport capacity scheduling case, and the higher the weight of the transport capacity scheduling case, the greater the probability of being selected.

8. A device for generating a transportation capacity scheduling scheme, characterized in that, Comprise: An acquisition module configured to acquire task information of transport capacity scheduling; A query module configured to call an MCP client according to the task information to send a query request corresponding to the task information to an MCP server; The MCP server is configured to query a corresponding multi-source knowledge base according to the query request, generate and return transport capacity scheduling multi-source information according to the query result; A processing module configured to take the transport capacity scheduling multi-source information as a context of a large language model, and generate a transport capacity scheduling scheme corresponding to the task information according to the large language model.

9. A computer storage medium, characterized in that The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the transport capacity scheduling scheme generation method in any one of claims 1 to 7.

10. An electronic device, comprising: Comprise: At least one processor; And The memory is in communication connection with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the transport capacity scheduling scheme generation method in any one of claims 1 to 7.